logging

Dropwizard Admin: Change loglevel for all

孤者浪人 提交于 2020-01-11 03:33:13
问题 My config is the standard logging: # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. level: INFO # Logger-specific levels. loggers: # Sets the level for 'com.example.app' to DEBUG. com.example.app: DEBUG # Redirects SQL logs to a separate file org.hibernate.SQL: level: DEBUG I want to change the default log level for all loggers to DEBUG . I've tried the following and nothing works (say admin port is 1234): curl -X POST -d "logger=all&level=DEBUG"

Dropwizard Admin: Change loglevel for all

让人想犯罪 __ 提交于 2020-01-11 03:33:06
问题 My config is the standard logging: # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. level: INFO # Logger-specific levels. loggers: # Sets the level for 'com.example.app' to DEBUG. com.example.app: DEBUG # Redirects SQL logs to a separate file org.hibernate.SQL: level: DEBUG I want to change the default log level for all loggers to DEBUG . I've tried the following and nothing works (say admin port is 1234): curl -X POST -d "logger=all&level=DEBUG"

How to disable Task Parallel Library's ETW EventSource in a Universal App?

﹥>﹥吖頭↗ 提交于 2020-01-11 03:22:27
问题 Task Parallel Library uses Event Tracing for Windows (ETW) for logging. Apparently, there is a bug related to logging, in either TPL or ETW, surfacing under Windows Phone or Windows Store .NET Runtime. The original issue is described here. A possible workaround would be to disable the TPL's ETW EventSource . How do I disable it from within a Universal Windows app , if I really want to? Reflection works for a Desktop app, but not for a WP/WinRT app. EventCommand.Disable is not recognized as a

IronPython ImportException: No module named logging

雨燕双飞 提交于 2020-01-11 03:06:10
问题 I got ironpython working fine on mono, but it doesn't import the logging module. Executing this code: ScriptEngine engine = Python.CreateEngine(); dynamic logging = engine.ImportModule("logging"); yields the following error: IronPython.Runtime.Exceptions.ImportException: No module named logging The IronPython assemblies I have included are up-to-date: IronPython.Modules.dll, Microsoft.Dynamic.dll, Microsoft.Scripting.dll, Microsoft.Scripting.Metadata.dll. How can I make use of the logging

JSF 2.0 Simple login page

…衆ロ難τιáo~ 提交于 2020-01-10 20:02:16
问题 I need to restrict the access to a part of the application. In order to access that part, user needs to log in. I have a table in my database called User, with usernames and hashed passwords and a login form that consists of two inputs and a submit. However, I don't know which classes/mathids should I use to log in the user (I assume that there is a support for this functionality in jsf). Also, as far as I know, I need to edit my web.xml to support the authentification. Could someone propose

JSF 2.0 Simple login page

怎甘沉沦 提交于 2020-01-10 20:02:12
问题 I need to restrict the access to a part of the application. In order to access that part, user needs to log in. I have a table in my database called User, with usernames and hashed passwords and a login form that consists of two inputs and a submit. However, I don't know which classes/mathids should I use to log in the user (I assume that there is a support for this functionality in jsf). Also, as far as I know, I need to edit my web.xml to support the authentification. Could someone propose

Using Console.WriteLine within a Windows Forms application

北城余情 提交于 2020-01-10 19:38:09
问题 I have an external DLL whose source code is C#. From the documentation for the DLL, I determined that it writes its debug messages to the console using Console.WriteLine . I'd like to use this DLL within a WinForms application. However, what I have discovered is that I cannot see the debug messages emitted by the DLL since a WinForms application does not have a console. is there a way to capture those debug messages, perhaps even to a simple log file? Of course, using ProcessInfo

C#: tail like program for text file

自作多情 提交于 2020-01-10 19:14:06
问题 I have a log file that continually logs short lines. I need to develop a service that reacts (or polls, or listens to) to new lines added to that file, a sort of unix' tail program, so that my service is always up to date reguarding the file. I don't think that opening a read stream and keeping it opened is a good idea. Maybe I should use the FileSystemWatcher class. Long story short, I need to parse in real time every new line added to this file. Any idea help or indication is really

Different log4j layout for debug and error?

不打扰是莪最后的温柔 提交于 2020-01-10 14:58:20
问题 In log4j, is there a way to have logger.error("") and logger.debug("") include different output layouts? I'd like errors to include method names and line numbers, both of which slow down application performance. EDIT: After adding apache-log4j-extras, the following config file works. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="WARNINGS" class="org.apache.log4j

Python3 add logging level

元气小坏坏 提交于 2020-01-10 14:32:29
问题 I have this code which works just fine for me. import logging import logging.handlers logger = None def create_logger(): global logger logger = logging.getLogger('Logger') logger.setLevel(logging.DEBUG) handler = logging.handlers.RotatingFileHandler("C:/Users/user/Desktop/info.log", maxBytes=1000000, backupCount=20) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') handler.setFormatter(formatter) logger.addHandler(handler) create_logger() logger.info("Text