⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e403. configuring logger default values with a properties file.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
The default values for loggers and handlers can be set using a properties file. This example demonstrates a sample logging properties file. 
For more information about logging properties, see the lib/logging.properties file in the JRE directory. 

    # Specify the handlers to create in the root logger
    # (all loggers are children of the root logger)
    # The following creates two handlers
    handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
    
    # Set the default logging level for the root logger
    .level = ALL
    
    # Set the default logging level for new ConsoleHandler instances
    java.util.logging.ConsoleHandler.level = INFO
    
    # Set the default logging level for new FileHandler instances
    java.util.logging.FileHandler.level = ALL
    
    # Set the default formatter for new ConsoleHandler instances
    java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
    
    # Set the default logging level for the logger named com.mycompany
    com.mycompany.level = ALL

The custom logging properties file is loaded by specifying a system property on the command line: 
    java -Djava.util.logging.config.file=mylogging.properties <class>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -