本文整理汇总了Java中org.hsqldb.lib.java.JavaSystem.setLogToSystem方法的典型用法代码示例。如果您正苦于以下问题:Java JavaSystem.setLogToSystem方法的具体用法?Java JavaSystem.setLogToSystem怎么用?Java JavaSystem.setLogToSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.lib.java.JavaSystem
的用法示例。
在下文中一共展示了JavaSystem.setLogToSystem方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setProperties
import org.hsqldb.lib.java.JavaSystem; //导入方法依赖的package包/类
/**
* Sets server properties using the specified properties object
*
* @param p The object containing properties to set
*/
public void setProperties(HsqlProperties p) {
checkRunning(false);
if (p != null) {
serverProperties.addProperties(p);
ServerConfiguration.translateAddressProperty(serverProperties);
}
maxConnections = serverProperties.getIntegerProperty(
ServerConstants.SC_KEY_MAX_CONNECTIONS, 16);
JavaSystem.setLogToSystem(isTrace());
isSilent =
serverProperties.isPropertyTrue(ServerConstants.SC_KEY_SILENT);
}
示例2: setProperties
import org.hsqldb.lib.java.JavaSystem; //导入方法依赖的package包/类
/**
* Sets server properties using the specified properties object
*
* @param p The object containing properties to set
*/
public void setProperties(HsqlProperties p) {
checkRunning(false);
if (p != null) {
serverProperties.addProperties(p);
ServerConfiguration.translateAddressProperty(serverProperties);
}
maxConnections = serverProperties.getIntegerProperty(
ServerConstants.SC_KEY_MAX_CONNECTIONS, 16);
JavaSystem.setLogToSystem(isTrace());
isSilent =
serverProperties.isPropertyTrue(ServerConstants.SC_KEY_SILENT);
isRemoteOpen = serverProperties.isPropertyTrue(
ServerConstants.SC_KEY_REMOTE_OPEN_DB);
}
示例3: init
import org.hsqldb.lib.java.JavaSystem; //导入方法依赖的package包/类
/**
* Initializes this server, setting the accepted connection protocol.
*
* @param protocol typically either SC_PROTOCOL_HTTP or SC_PROTOCOL_HSQL
*/
protected void init(int protocol) {
// PRE: This method is only called from the constructor
serverState = ServerConstants.SERVER_STATE_SHUTDOWN;
serverConnSet = new HashSet();
serverId = toString();
serverId = serverId.substring(serverId.lastIndexOf('.') + 1);
serverProtocol = protocol;
serverProperties = ServerConfiguration.newDefaultProperties(protocol);
logWriter = new PrintWriter(System.out);
errWriter = new PrintWriter(System.err);
JavaSystem.setLogToSystem(isTrace());
}
示例4: setProperties
import org.hsqldb.lib.java.JavaSystem; //导入方法依赖的package包/类
/**
* Sets server properties using the specified properties object
*
* @param props The object containing properties to set
* @throws ServerAcl.AclFormatException
* ACL list was requested but problem loading ACL.
* @throws IOException
* ACL list was requested but I/O problem loading ACL.
*/
public void setProperties(HsqlProperties props)
throws IOException, ServerAcl.AclFormatException {
checkRunning(false);
if (props != null) {
props.validate();
String[] errors = props.getErrorKeys();
if (errors.length > 0) {
throw Error.error(ErrorCode.SERVER_NO_DATABASE, errors[0]);
}
serverProperties.addProperties(props);
}
maxConnections = serverProperties.getIntegerProperty(
ServerProperties.sc_key_max_connections, 16);
JavaSystem.setLogToSystem(isTrace());
isSilent =
serverProperties.isPropertyTrue(ServerProperties.sc_key_silent);
isRemoteOpen = serverProperties.isPropertyTrue(
ServerProperties.sc_key_remote_open_db);
isDaemon =
serverProperties.isPropertyTrue(ServerProperties.sc_key_daemon);
String aclFilepath =
serverProperties.getProperty(ServerProperties.sc_key_acl);
if (aclFilepath != null) {
acl = new ServerAcl(new File(aclFilepath));
if (logWriter != null && !isSilent) {
acl.setPrintWriter(logWriter);
}
}
}
示例5: setTrace
import org.hsqldb.lib.java.JavaSystem; //导入方法依赖的package包/类
/**
* Sets whether trace messages go to System.out or the
* DriverManger PrintStream/PrintWriter, if any.
*
* @param trace if true, route JDBC trace messages to System.out
*
* @jmx.managed-attribute
*/
public void setTrace(boolean trace) {
printWithThread("setTrace(" + trace + ")");
serverProperties.setProperty(ServerProperties.sc_key_trace, trace);
JavaSystem.setLogToSystem(trace);
}
示例6: setTrace
import org.hsqldb.lib.java.JavaSystem; //导入方法依赖的package包/类
/**
* Sets whether trace messages go to System.out or the
* DriverManger PrintStream/PrintWriter, if any.
*
* @param trace if true, route JDBC trace messages to System.out
*
* @jmx.managed-attribute
*/
public void setTrace(boolean trace) {
printWithThread("setTrace(" + trace + ")");
serverProperties.setProperty(ServerConstants.SC_KEY_TRACE, trace);
JavaSystem.setLogToSystem(trace);
}