Category "logging"

NLog not logging debug messages

I'm having a problem with logging Debug level messages in a .NET Core 3.1 Worker Service project. Neither my file target or console are getting Debug level mess

How to get current active user in middleware FastAPI python

I have developed an auth on FastAPI Python using the doc here https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/ (I use exactly the code shown, nothing

Loguru: how to obfuscate data in logs

Using the python logger I can obfuscate data like this: import logging import re import sys class MySensitiveFormatter(logging.Formatter): """Formatter th

Log file is not being written in Laravel 5.5

I have logging enabled by default on Laravel 5.5. The settings are: In config/app.php file: 'log' => env('APP_LOG', 'single'), 'log_level' => env('APP

Cloud Logging Advanced Log Filters: Find HTTP Requests >= Duration

Google's Advanced Cloud Logging Filters seem incredibly powerful, but equally complex to use. How does one craft a logging query that finds all HTTP requests wi

FluentD: record_transformer conditional statements

How to put conditional if else statements in fluentd record_transformer and add output to column. eg: <filter nifi.*> @type record_transformer enabl

How can I log my output to .txt file instead of the terminal in Expo?

I am using Expo for my React Native Application. console.log(responseJson) writes the App.js output to the my zsh terminal however my Json gets truncated wit

Processing a LOG file on an automounted CIFS host, which is frequently turned OFF

So I am new to Ubuntu and I have some log files on a windows machine, which I should process frequently. On my ubuntu server there is a service which watches fo

Python Bottle: Can't connect to server or debug it

When I'm trying to run a server in this example I can see that it runs on the correct port. However, it is not possible to reach it externally (internal server

How to convert scala.some to scala.mutable.Map?

i am trying to write code to mask nested json fields.. def maskRecursively(map :mutable.Map[String,Object]):mutable.Map[String,Object] ={ val maskColumns = PII

How to set the log level for an imported module?

Write your code with a nice logger import logging def init_logging(): logFormatter = logging.Formatter("[%(asctime)s] %(levelname)s::%(module)s::%(funcNa

How do I get logs from all pods of a Kubernetes replication controller?

Running kubectl logs shows me the stderr/stdout of one Kubernetes container. How can I get the aggregated stderr/stdout of a set of pods, preferably those cr

Is it possible/advisable to put a logger into a single package and use it across all packages in a project?

What I want to do: To create a Python package, and in that package, create a class that instantiates a logger. I'd create an instance of this class in the main

Visual Studio Code not showing console logs

For example, in this method, I use console.log() to log to console for debugging purposes _onSearchTextChanged = (event) => { console.log('_onSearchText

properly logging unicode & utf-8 exceptions in python 2

I'm trying to log various exceptions from libraries in python 2.7. I find that sometimes the exceptions contain a unicode string and sometimes a utf8 bytestring

SonarQube: Invoke method(s) only conditionally

The following part of code raises a major bug at SonarQube : "Invoke method(s) only conditionally." How am I supposed to fix this? if(us != null){ logger.

messages log is not rotated via logrotate config

I followed some instructions I found online to apply log rotation via rotated of an aws ec2 instance, the simplest way I found on applying it on /var/log/messag

What's are the fields and how do you set them in the Spring Cloud Sleuth log?

My logs look like this 2022-05-05 17:08:11.686 WARN [,6274047bc8c37bf476c8bf6ff3052573,76c8bf6ff3052573] 1 --- [wtConsumer-8819] .a.ProtectedResourceGatewayFil

How to pretty print a complex Java object (e.g. with fields that are collections of objects)? [closed]

I'm looking for a library function (ideally from a commonly used framework e.g. Spring, Guava, Apache Commons etc.) that will nicely print the

How to use log4go with configuration file?

I have been trying to use log4go in golang. But I could not find a proper example where log4go configuration properties were used like rotation,maxSize etc to c