OrientDB Logging - OrientDB

What is OrientDB Logging?

OrientDB uses the Java Logging framework bundled with Java digital system. OrientDB's default log layout is managed through OLogFormatter class.

The following statement is the simple syntax of logging command.

Following are the information about the options in the above syntax.

<date> − it is the log date inside the following format: yyyy-MM-dd HH:mm:ss:SSS.

<level> − it is the logging level as 5 chars output.

<message> − it's miles the text of log, it is able to be of any size.

[<class>] − it's far the Java class this is logged (optional).

Supported levels are the ones contained within the JRE class java.util.logging.level. they're –

  • SEVERE (highest value)
  • WARNING
  • INFO
  • CONFIG
  • FINE
  • FINER
  • FINEST (lowest value)

By default, two loggers are installed –

  • Console, because the output of the shell/command set off that starts the application/server. can be modified by using setting the variable ‘log.console.level’.
  • File, because the output to the log files. can be changed through putting the ‘log.file.level’.

Configure Logging

The logging techniques and policies may be configured the usage of a file following the Java.

Syntax − Java Logging configuration.

Example

Copy the following content from orientdb-server-log.properties record and put it within the $ORIENTDB_HOME/config file.

To tell the JVM where the properties file is located, you need to set the "java.util.logging.config.file" system assets to it. as an example, use the following command –

Set the logging level

To change the logging level with out editing the logging configuration, simply set the "log.console.level" and "log.file.level" system variables to the asked levels.

Logging at Startup

Following are the methods to set logging at startup level in special methods.

In the Server Configuration

Open the file orientdb-server-config.xml and upload or replace these lines at the quit of the report inside the section –

In Server.sh (or .bat) Script

Set the system assets "log.console.level" and "log.file.level" to the levels you want the usage of the -D parameter of java.

Logging at Run-time

Following are the methods to set logging at startup level in special methods.

By using Java Code

The system variable may be set at startup the usage of the system.setProperty() API. the following code snippet is the syntax to set logging level using Java code.

On Remote Server

Execute a HTTP submit against the URL: /server/log./, where −

  • <type> Can be "console" or "file"
  • <level> Is one of the supported levels

Example

The following example uses cURL to execute a HTTP submit command towards OrientDB Server. Server's "root" user and password have been used, update with your own password.

Allow the finest tracing level to console –

Enable the finest tracing level to file −

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

OrientDB Topics