NGINX error log format documentation

From reading src/core/ngx_log.c I guess the general error log format seems to be YYYY/MM/DD HH:MM:SS [LEVEL] PID#TID: *CID MESSAGE With PID and TID being the logging process and thread id and CID a number identifying a (probably proxied) connection, probably a counter. The *CID part is optional.

How to create 2 different ROOT loggers with logback?

You will not ever have more than one root-logger, so your question is a bit misleading. What you are looking for is how to fine-tune which events each of the appenders does log. And for that, you add a ThresholdFilter to each of the appenders: http://logback.qos.ch/manual/filters.html#thresholdFilter <filter class=”ch.qos.logback.classic.filter.ThresholdFilter”> <level>INFO</level> </filter> Configure level INFO for the … Read more

Sass: print to terminal

Sass 3.3 and older There are 2 error related directives: @debug The @debug directive prints the value of a SassScript expression to the standard error output stream. @debug 10em + 12em; outputs: Line 1 DEBUG: 22em @warn The @warn directive prints the value of a SassScript expression to the standard error output stream. It’s useful … Read more

How do I do logging in Haskell?

First, a quick disclaimer: “logging” doesn’t usually make sense in general Haskell code, because it assumes some sort of sequential execution that may or may not be meaningful. Make sure you distinguish between logging how the program executes and logging what values are computed. In strict imperative languages these are mostly the same, but in … Read more

ASP.NET Core Web API Logging from a Static Class

Solution is to have a static reference to the LoggerFactory in a utility static class initialized on startup: /// <summary> /// Shared logger /// </summary> internal static class ApplicationLogging { internal static ILoggerFactory LoggerFactory { get; set; }// = new LoggerFactory(); internal static ILogger CreateLogger<T>() => LoggerFactory.CreateLogger<T>(); internal static ILogger CreateLogger(string categoryName) => LoggerFactory.CreateLogger(categoryName); } … Read more

How to write logs from one service into separate file?

The MonologBundle logs everything using the same handlers for the whole framework. That means if one of your services needs to log to different handlers, you should create your own Logger/Handler and inject that in your service. This could be an example config (in yaml): services: my_logger: class: Symfony\Bridge\Monolog\Logger arguments: [soap] calls: – [pushHandler, [@my_handler]] … Read more

Save docker-compose logs to a file

By default docker uses the json-file driver to record your containers logs and the raw json output of the logs can be found in: /var/lib/docker/containers/[container-id]/[container-id]-json.log You can get this location by running: docker inspect –format=”{{.LogPath}}” [container-id or container-name] When you run docker-compose logs [service-name], docker-compose will attach to the service (container) you reference and the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)