我正在尝试调试Neo4j社区服务器的服务包装器,无论我尝试过什么,都不会生成日志文件。 Windows-Wrapper实际上是否生成日志条目?该文档引用了neo4j-wrapper而不是windows-wrapper。
操作系统:Windows 8.1或Windows Server 2012 R2
Neo4j:2.1.4或2.1.7社区
我将日志记录级别更改为ALL,并且生成的唯一日志文件是/data/neo4j.0.0.log,它似乎只包含有关HTTP端点和/data/graph.db/messages.log的信息。没有对包装器的引用。我希望找到一个名为/data/log/windows-wrapper.0.0.log的日志文件
关于我做错了什么的任何想法?
windows-wrapper.logging.properties
# Properties file which configures the operation of the JDK logging facility. # The system will look for this config file, first using a System property # specified at startup: # # >java -Djava.util.logging.config.file=myLoggingConfigFilePath # # If this property is not specified, then the config file is retrieved from its # default location at: # JDK_HOME/jre/lib/logging.properties # Global logging properties. # ------------------------------------------ # The set of handlers to be loaded upon startup. # Comma-separated list of class names. # (? LogManager docs say no comma here, but JDK example has comma.) #handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler handlers=java.util.logging.FileHandler # Default global logging level. # Loggers and Handlers may override this level # SERVERE, INFO, FINE, FINEST .level=ALL # Loggers # ------------------------------------------ # Loggers are usually attached to packages. # Here, the level for each package is specified. # The global level is used by default, so levels specified here simply act as # an override. org.neo4j.server.level=ALL # Handlers # ----------------------------------------- # --- ConsoleHandler --- # Override of global logging level java.util.logging.ConsoleHandler.level=ALL java.util.logging.ConsoleHandler.formatter=org.neo4j.server.logging.SimpleConsoleFormatter java.util.logging.ConsoleHandler.filter=org.neo4j.server.logging.NeoLogFilter # --- FileHandler --- # Override of global logging level java.util.logging.FileHandler.level=ALL # Naming style for the output file (the output file is placed in the directory # defined by the "user.home" System property): # "/" the local pathname separator # "%t" the system temporary directory # "%h" the value of the "user.home" system property # "%g" the generation number to distinguish rotated logs # "%u" a unique number to resolve conflicts # "%%" translates to a single percent sign "%" java.util.logging.FileHandler.pattern=data/log/windows-wrapper.%u.%g.log # Specifies whether the FileHandler should append onto any existing files # (defaults to false): java.util.logging.FileHandler.append=true # Limiting size of output file in bytes (10M): java.util.logging.FileHandler.limit=10000000 # Number of output files to cycle through, by appending an integer to the base # file name: java.util.logging.FileHandler.count=10 # The name of the character set encoding to use (defaults to the default # platform encoding): #java.util.logging.FileHandler.encoding= # Style of output (Simple or XML): java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
logging.properties
# Properties file which configures the operation of the JDK # logging facility. # The system will look for this config file, first using # a System property specified at startup: # # >java -Djava.util.logging.config.file=myLoggingConfigFilePath # # If this property is not specified, then the config file is # retrieved from its default location at: # JDK_HOME/jre/lib/logging.properties # Global logging properties. # ------------------------------------------ # The set of handlers to be loaded upon startup. # Comma-separated list of class names. # (? LogManager docs say no comma here, but JDK example has comma.) handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler #handlers=java.util.logging.ConsoleHandler # Default global logging level. # Loggers and Handlers may override this level # SEVERE, INFO, FINE, FINEST .level=ALL # Loggers # ------------------------------------------ # Loggers are usually attached to packages. # Here, the level for each package is specified. # The global level is used by default, so levels specified here simply act as # an override. org.neo4j.server.level=ALL # Handlers # ----------------------------------------- # --- ConsoleHandler --- # Override of global logging level java.util.logging.ConsoleHandler.level=ALL java.util.logging.ConsoleHandler.formatter=org.neo4j.server.logging.SimpleConsoleFormatter #java.util.logging.ConsoleHandler.filter=org.neo4j.server.logging.NeoLogFilter # --- FileHandler --- # Override of global logging level java.util.logging.FileHandler.level=ALL # Naming style for the output file (the output file is placed in the directory # defined by the "user.home" System property): # "/" the local pathname separator # "%t" the system temporary directory # "%h" the value of the "user.home" system property # "%g" the generation number to distinguish rotated logs # "%u" a unique number to resolve conflicts # "%%" translates to a single percent sign "%" java.util.logging.FileHandler.pattern=data/log/neo4j.%u.%g.log # Specifies whether the FileHandler should append onto any existing files # (defaults to false): java.util.logging.FileHandler.append=true # Limiting size of output file in bytes (10M): java.util.logging.FileHandler.limit=10000000 # Number of output files to cycle through, by appending an integer to the base # file name: java.util.logging.FileHandler.count=10 # The name of the character set encoding to use (defaults to the default # platform encoding): #java.util.logging.FileHandler.encoding= # Style of output (Simple or XML): java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
答案 0 :(得分:0)
由于我是最后一个对代码库的特定部分进行更改的人,我会尝试一下:是的,我们会做日志记录。例如:https://github.com/neo4j/windows-wrapper/blob/master/src/main/java/org/neo4j/wrapper/NeoServiceWrapper.java#L49-60
这只是在您将其作为控制台应用程序启动的情况下,但似乎。而且我不确定我们使用的库是否记录了它自己的库。而且我不得不承认,最后我看到了这一点,我没有注意到记录是否确实有效。
所以,我现在还没有给你任何具体的建议。我要确保在积压的记录中记下这一点。同时,如果您获得突破,请告诉我们!