@UpdateLogging — Changes the logging configuration for a running database.
@UpdateLogging CString configuration
The @UpdateLogging system procedure lets you change the logging configuration for VoltDB. The second argument, configuration, is a text string containing the Log4J XML configuration definition.
Returns one VoltTable with one row.
Name | Datatype | Description |
---|---|---|
STATUS | BIGINT | Always returns the value zero (0) indicating success. |
From the command line, the recommended way to update the Log4J configuration is to use the voltadmin log4j command, specifying the location of an updated configuration file. For example:
$ voltadmin log4j mylog4j.xml
The following program example demonstrates another way to update the logging, using the system procedure and passing the contents of an XML file as the argument:
try { Scanner scan = new Scanner(new File(xmlfilename)); scan.useDelimiter("\\Z"); String content = scan.next(); client.callProcedure("@UpdateLogging",content); } catch (Exception e) { e.printStackTrace(); }