FAQ Database Discussion Community


Python root logger messages not being logged via handler configured with fileConfig

python,python-2.7,logging,configuration-files
The Problem: Given a logging config and a logger that employs that config, I see log messages from the script in which the log handler is configured, but not from the root logger, to which the same handler is assigned. Details: (Using Python 2.7) I have a module my_mod which...

log4net - how to filter out exceptions which contain a specified text?

logging,log4net,error-logging
I use log4net to log exceptions, and it generally works fine. But I would like to be able to filter out exceptions which contain a specific text string. I found this example of implementing a filter, but it does the opposite of what I want; it only includes messages with...

How can I create a history of previously created TextViews in an Android App? One that the user can access

android,logging,textview,record,history
I have a simple simple app, that simply takes a user's question as input, and creates a long string containing: the original question, and a randomly generated answer. This string then gets displayed as a TextView (I'm sorry if I'm not describing this correctly). What I would like is to...

What are correct permissions for Linux Apache2 PHP 5.3 log file?

php,linux,apache,logging,permissions
I discovered the reason why I was not getting entries into my php_errors.log file related to permissions. Right now, I have set it to 666 (rw-rw-rw-) but surely this is a security weakness? Thus, my question. php.ini file: error_log /var/log/httpd/php_errors.log log_errors On # ls -ld /var/log /var/log/httpd /var/log/httpd/php_errors.log drwxr-xr-x 6...

Worklight 6.2 - Server side WL.Logger

logging,worklight
I'm trying configure server logs on worklight runtime environment 6.2 (deployed on WAS 8.5) Is it possible to configure and format the WL.Logger output on server side in order to: Log on a differtent file than standard output Use a conversion pattern layout (similar to the log4j one): e.g. [%d{yyyy-MM-dd...

Python - Logging from multiple modules to rotating files without printing to console

python,logging
I am trying to add logging to a medium size Python project with minimal disruption. I would like to log from multiple modules to rotating files silently (without printing messages to the terminal). I have tried to modify this example and I almost have the functionality I need except for...

Java.util.logger new file every day

java,logging
I am using java.util.logging framework to implement logging in my JSF application. I have successfully done implementing this, but however I have a new requirement to rotate the logs and create a new log file for each day. I am not able to figure out how this can be implemented....

viewing google app engine Python logging messages in CodeEnvy

python,google-app-engine,logging,cloud
I'm trying to move my GAE development to the cloud. So far Codeenvy has the richest toolset however I'm struggling with one small issue. when I use the python logging library I don't know where to view these messages! def post(self): self.response.write('Processing form data...') feedback = self.request.get('content') logging.info(feedback) I assumed...

Neo4j & Spring Data Neo4j 4.0.0 : Importing large datasets

logging,import,neo4j,large-data,spring-data-neo4j-4
I want to insert real-time logging data into Neo4j 2.2.1 through Spring Data Neo4j 4.0.0. The logging data is very big which may reach hundreds of thousands records. How is the best way to implement this kind of functionality? Is it safe to just using the .save(Iterable) method at the...

Setting log4j.rootLogger=OFF in one class configuration, will cause log crash in another class

java,logging,log4j
Setting log4j.rootLogger=OFF in one class configuration, will cause another class to not log. I have two sample classes: LogCrasher and MainLogger. This two classes are configured to log some test logs. Each class have it's own configuration file. LogCrasher was called from MainLogger. When log4j.rootLogger in LogCrashers log4j configuration file...

How to Log to a variable or write observer that sends messages to variable in Twisted / Autobahn

python,logging,twisted,observers,autobahn
I am writing a websocket client that will receive updates every few seconds or so utilizing autobahn with twisted. I am successfully logging the data using multiple observers, however I want to use part of the messages I am receiving to send to a dataframe (and eventually plot in real...

Android what's the best way to hide logs? [duplicate]

android,logging
This question already has an answer here: Remove all debug logging calls before publishing: are there tools to do this? 12 answers so.. I'm using Log.d("", ""); in many places in my app for debuging. but I don't want those logs in the store. right now in order to...

Node/Express access logger from request object

javascript,node.js,logging,express
I am trying to see if there is a way to access my logger form a request object. I have a cusotm winston wrapper that uses winston, express-winston, and moment to keep things clean across my apps. In my app.js I just have var logger = require('winston-custom'); server.use(logger()); Then in...

How could I write data hourly to files named by current hour with multiple processes?

c++,linux,logging,multiprocessing
I have to write some data to a file based on current hour in my server. For example, write data to a file named like 2015061117.txt. And there is multiple processes write data to file simultaneously. How should I design my server to implement this? Do I need to use...

Logback TCP syslog conforming RFC 5424

logging,tcp,logback,syslog
I'm trying, with logback, to send logging messages in a remote syslog, using TCP, and conforming to RFC 5424. As far as I understand, logback default's syslog appender only handles UDP. So far I've found a logback-syslog4j library on github which handles TCP. But it doesn't seem configurable enough to...

Method to convert android logs to events [closed]

android,logging,cep
How to convert android logs to events in order to do complex event processing? Please suggest hints or methods.

Python Logs displaying multiple times in stdout

python,logging
I currently have two classes. A subclass and a superclass. All my superclass does is thread the methods in the subclass. The subclass's logs were out of order, and I was told to fix it. The logs are now in order, but the log reprints with a format and without...

Cannot log WinZip command line process

logging,command-line,vbscript,zip,winzip
I got the following vbscript test code that zip some test files via WinZip Command Line: Dim strWinZipDir, strZipFileToCreate, strFilesToZip, strWinZip, strCommand strWinZipDir = "C:\Program Files\WinZip\Winzip32.exe" strZipFileToCreate = "C:\Users\ext_dirmod_01\Desktop\TestLog.zip" strFilesToZip = """C:\Users\ext_dirmod_01\Desktop\FacturasGRA.vbs"" ""C:\Users\ext_dirmod_01\Desktop\Test Zip Windows.vbs""" Set objFSO = CreateObject("Scripting.FileSystemObject") strWinZip = objFSO.GetFile(strWinZipDir).ShortPath strCommand = strWinzip & "...

Find actual opened logfile with JDK Logging

java,logging,java.util.logging
I saw Java Logging - where is my log file?, but in my case I would like to find out in my Java application which logfile the FileHandler actually opened, i.e. if I start multiple processes and have a pattern set as java.util.logging.FileHandler.pattern=MyApp.%g.%u.log Then the %g and %u will be...

Python logging sys.exit('message')

python,logging,exit
I followed this guide on how to take advantage of Python's logging module. Now I each of my .py files get its logger by calling logger = logging.getLogger(__name__) The main .py file sets up logging reading a json configuration file. import os import json import logging.config def setup_logging( default_path='logging.json', default_level=logging.INFO,...

What should 'git log ^X' show?

git,logging,exclude
$ git log --oneline 05f1c3b master: Modified 1.txt f7433e0 Updated by master e30dff9 Modified 1.txt 82ebf7a Modified 1.txt cbb2785 master: Added 4.txt after rebase branch was created 980a5d6 b1: Added 1.txt badc046 Resolved merge conflict 47a2d78 Mods by b2 c3eb61e Added by b1 9378e3d 1ST commit The following shows nothing:...

Print Class Name, Method name and line number using Logger's info()

java,logging,logback
I already configured logback file to get classname, method name and line number. <pattern> %d{HH:mm:ss.SSS} [%thread] %-5level %class{36}.%M %L - %msg%n </pattern> I want to print log message when entering and existing method. How can i do that within the class using info() method. I used the code below. But...

Winston Improper Log Configuration

node.js,logging,winston
I have decided to use winston for logging in my node project. I am developing this application on windows platform but ultimatly it would be on a linux platform. Here is the code I have used to configure the logger. /* Custom logging module * to write appropriate logs into...

To implement the max level programmatically in condition

.net,logging,nlog
I had <logger name="*" minlevel="Trace" writeTo="f1" /> Now I added the maxlevel. so <logger name="*" minlevel="Trace" maxlevel="Error" writeTo="f1" /> I want to implement it programmatically. What I tried Then in code: var filter = new ConditionBasedFilter(); filter.Action = FilterResult.Log; filter.Condition = "(level <= LogLevel.Info)"; var loggerRule = new LoggingRule(ruleName, LogLevel.Debug,...

What is the difference between LOG.error(“IOException: ” + e.getMessage(), e); and LOG.error(“IOException: ” +e.getMessage());?

java,logging,exception-handling
I have observed that both the statements are valid. What is the extra thing logged in the first statement compared to the second one?

userid is not printed in Apache access logs

apache,logging,userid
I have a production setup as webSEAL --> F5 --> 2 Apache --- 2 weblogic servers. For every request webSEAL logs prints logged-in user-id and weblogic which is at the very last in infrastructure chain also have the user-id available in weblogic http access.log (not application log but weblogic internal...

Error while deploying topology on storm cluster

java,logging,storm,apache-kafka,kafka
I am trying to deploy a simple word count topology on storm clustre.I am using kafka as the input(kafka Spout).This is the error i am getting.I am very new to storm.Please suggest the changes.Thanks in Advance !! java.lang.NoClassDefFoundError: Could not initialize class org.apache.log4j.Log4jLoggerFactory at org.apache.log4j.Logger.getLogger(Logger.java:39) at kafka.utils.Logging$class.logger(Logging.scala:24) at kafka.consumer.SimpleConsumer.logger$lzycompute(SimpleConsumer.scala:30) at...

Log4J2 sync loggers faster than mixed async/sync loggers

java,logging,asynchronous,log4j2
Based on https://logging.apache.org/log4j/2.x/manual/async.html I want to use the Mixing Synchronous and Asynchronous Loggers approach in order to benefit from some performance improvement over the all synchronous loggers. The benchmark code: public static void main(String[] args) { org.apache.logging.log4j.Logger log4j2Logger = org.apache.logging.log4j.LogManager .getLogger("com.foo.Bar"); long start = System.currentTimeMillis(); int nbLogMessages = 1 *...

Spark streaming on YARN executor's logs not available

logging,apache-spark,yarn,spark-streaming
I'm running the following code .map{x => Logger.fatal("Hello World") x._2 } It's spark streaming applciation runs on YARN. I upadted log4j and provided it with spark-submit (using --files). My Log4j configuration was loaded which I see from logs and applied to Driver's logs (I see my log level only and...

Python TimedRotatingFileHandler backup count to 0 is not worrking

python,logging
I created the TimedRotatingFileHandler for the logging module with the backup count as 0 in the Flask server. However the first log file generated includes all the logging information. But the rest of the log files contains the logs as desired. This is the code I've used: logging.basicConfig( filename='logs/img-search.log', level=logging.DEBUG,...

Log4J2 Factory Error when attempting to use SMTP Appender

java,email,logging,log4j2,smtpappender
Good afternoon, When I attempt to use the SMTP Appender, I get an odd error in the console. The error appears to occur when the XML file is loaded, as it isn't logged via any output stream except stdout. The contents of the appender are as follows (and I have...

Is there any sdk to log exceptions, events and errors in production app?

android,logging,error-handling,sdk,production
I want to catch all the un expected/undesirable events in my app during production. I want something which can send a error log file to server and I can easily read it through a web application. Do you know anything of this sort ?

Where to write my application's log in OS X?

osx,logging
I have node-webkit app running in OS X but it doesn't have rights to write to /var/log nor to /private/var/log. Where should it write to?

Job log management system

logging,archive
I’m looking for recommendations for a software to store a large number of logs from daily batch jobs run in a couple of different enterprise scheduling systems. After perhaps a year, the logs no longer need to be directly accessible via these scheduling systems, but it is still important that...

LoggerFactory is not a Logback LoggerContext but Logback is on the classpath

java,logging,spring-security,spring-boot,dependency-management
I think some module in spring-boot-starter-security is conflict with log4j, but I don't know which one. my gradle dependence is as following: compile("org.springframework.boot:spring-boot-starter-thymeleaf") compile("org.springframework.boot:spring-boot-starter-security"){ exclude module: "spring-boot-starter-logging" } compile "org.apache.logging.log4j:log4j-api" compile "org.apache.logging.log4j:log4j-core" compile "org.apache.logging.log4j:log4j-slf4j-impl" compile('org.apache.poi:poi:3.10.1')...

How to get the logs in XML file in cleartool. I want the output of command cleartool lshistory in XML file

java,logging,clearcase,cleartool
I am trying command cleartool lshistory > file.txt through this I am getting the file in text format similarly I want the log file in XML format.

Where can I found logs for WCPP.exe?

c#,windows,logging,printing,neodynamic
Where can I found logs to Windows Print Client by Neodynamic? There is nothing in EventViewer, no log files in instalation dir, no configuration. I try to implement pringing by them client, I do everything like they in sample project, by printing client give me error. I have somewehe error,...

Logging in PHP using XAMPP

php,logging
I am creating a web solution in PHP (XAMPP). Especially when I do AJAX calls, I cannot echo to debug as it is not bringing output adding to the echo for return JSON object. Is there a logging mechanism prevalent in PHP?

Apache log showing most requests as coming from my server public ip

apache,logging
It has been like a week where all my access logs are being filled with my own server IP. Like I see for example GoogleBot in my logs but instead of it showing that this is coming from a Google IP, it shows as coming from my server's public IP....

Preserve Java stack trace across threads

java,multithreading,logging,stack-trace
I am using ExecutorService to send mails asynchronously, so there is a class: class Mailer implements Runnable { ... That handles the sending. Any exception that gets caught is logged, for (anonymized) example: javax.mail.internet.AddressException: foo is bar at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:1213) ~[mail.jar:1.4.5] at javax.mail.internet.InternetAddress.parse(InternetAddress.java:1091) ~[mail.jar:1.4.5] at javax.mail.internet.InternetAddress.parse(InternetAddress.java:633) ~[mail.jar:1.4.5] at...

Logging service allowing simple interface

html,logging,logstash,splunk,logentries
I'm looking to do some dead-simple logging from a web app (client-side) to some remote service/endpoint. Sure, I could roll my own, but for the purpose of this task, let's assume I want an existing service like Logentries/Splunk/Logstash so that my viewers can still log debugging info if my backend...

Sql trigger not working correctly, deleting to logtable

sql,sql-server,logging,triggers
this trigger is designed to log password changes to a logtable, when you change the password, the old password goes to the table, and it will do that for 5 passwords, when it exceeds the number of 5, it will remove the oldest password to make room for newer ones...

How log an HTTP JSON request in Loopback app deployed on Heroku?

node.js,logging,heroku,express,loopbackjs
An app (Loopback) is deployed on Heroku, and I need to to see the req body (the JSON) send to this app for debugging purpose. So the access to the log is : heroku logs --tail The server.js is like the following : var loopback = require('loopback'); var boot =...

How to wrap error trace inside Log.Severe()

java,google-app-engine,logging
I am using java.util.logging.Logger for logging on app-engine. Normally all I have to do to get my errors is to call e.printStackTrace(). Except I get nothing when I make the call from inside a worker thread that belongs to a Task Queue. But within the Task Queue, all the loggings...

SimpleInjector decoration with additional dependency

c#,logging,dependency-injection,decorator,simple-injector
I have a decorator SomethingLoggerDecorator that is supposed to decorate ISomething instances with logging: public class SomethingLoggerDecorator : ISomething { private readonly ISomething decoratee; private readonly ILogger logger; public SomethingLoggerDecorator(ISomething decoratee, ILogger logger) { this.decoratee = decoratee; this.logger = logger; } public void DoSomething() { this.logger.Info("Doing Something"); this.decoratee.DoSomething(); } public...

any additional advantages to user SLF4J library instead of apache log4j

java,apache,logging,log4j,slf4j
I came across this library for logging slf4j in my assignment. I have used apache log4j library before but from the documentation I could not understand the use case for the slf4j library. (face palm) Can any one tell me the advantages of using SLF4j or possible real world cases....

R/Shiny WebApp logs, running in shell (Ubuntu crontab)

r,ubuntu,logging,shiny,crontab
I'm running, using crontab, an R/Shiny WebApp. The crontab expression looks like this: @reboot R -e 'shiny::runApp(...)' | tee /var/log/shiny-server.log I've also tried @reboot R -e 'shiny::runApp(...)' &> /var/log/shiny-server.log but does the same: It prints to the file the header when you initialize R from shell. But it doesn't print...

node.js winston logger no colors with nohup

node.js,logging,nohup,winston
We are using winston logger in our project with the following transport settings: file: { filename: __base + '/log/server.log', colorize : true, timestamp : true, json : false, prettyPrint : true } If the application is started with nohup, log file is not colorized. It works only without nohup. nohup...

monitor log4j behaviour under load

logging,concurrency,io,log4j
I want to test my J2EE application under high load of sessions accessing different pages. This web application uses Log4J to log bunch of errors,warnings and infos. I want to test what is the side effect of this load on writing log files, especially concurrent I/O writing actions. I found...

One class instance used automatically throughout process

python,class,python-2.7,logging
The python logging module once imported and instantiated will be so across the process, inside all modules and threads. How did they achieve that effect? Example: myapp.py import logging import mylib def main(): logging.basicConfig(filename='myapp.log', level=logging.INFO) logging.info('Started') mylib.do_something() logging.info('Finished') if __name__ == '__main__': main() mylib.py import logging def do_something(): logging.info('Doing something')...

Golang go-workers custom logging middleware?

logging,go,sidekiq,middleware
I'm building a Golang app that implements a Sidekiq-compatible jrallison/go-workers work queue and a custom logging wrapper around Sirupsen/logrus for marshaled JSON logs. Now, all of my app (except for go-workers so far) uses my logger-wrapper in a central place to ensure that 100% of its output is JSON compatible....

Log4j Implicit String Formatting

java,logging,log4j,string-formatting
I am using log4j v1.2.14 for logging in my project and I am also using Java 7 String.format() to put variables in my output. Currently I am writing LOGGER.info(String.format("Your var is [%s] and you are [%s]", myVar, myVar1)); Is this really the best way to output strings? I feel that...

Android LogCat Logging way too much stuff?

android,logging
Android Logcat is logging way too much stuff on real device and sometimes the emulator. My Settings are: Show only selected application but then it says above No Debuggable Applications. The Log Level is currently on Debug Here is an example of this useless crap 05-29 04:53:36.173 414-464/? I/WifiHW﹕ CMD:...

How to analyze httpd (apache webserver) logs in CentOS 7

apache,logging,analyzer,centos7,nanohttpd
I have configred a static IP on my server that is using CentOS 7. Here httpd is the webserver. Now I have to analyze following things. Total number of queries per day (or toall) Total requests sent and served. Unique visitors details List of queries recieved. (status etc.) HOSTs/OS/Browsers that...

Ant places stacktraces in standard output

java,logging,ant,stderr
I am using Ant, together with tasks I have created myself. When those custom ant tasks fail, their output is redirected to stdout. I want them to be redirected to stderr. A simple full generic Ant example is : <project name="test" default="init" basedir="."> <!-- Initialise project parameters --> <target name="init">...

Visual data from logs

ruby-on-rails,ruby,logging,dashboard
I have an app I'm working on that is a credits system for a store. A customer brings in items and receives a credit and then can turn around and use that credit towards certain goods in the store. I've set it up so every time a credit holder or...

Python logging setLevel not logging

python,logging
Is there anything in this code that would explain why my info messages aren't going into the log. Properly formatted warnings and above are going into both log files. Initializing logger: logger = logging.getLogger() f = logging.Formatter('%(asctime)s\n%(levelname)s: %(funcName)s %(message)s') out = logging.handlers.RotatingFileHandler(filename=self.f_stdout, maxBytes=1048576, backupCount=99) err = logging.handlers.RotatingFileHandler(filename=self.f_stderr, maxBytes=1048576, backupCount=99) out.setLevel(logging.INFO)...

Read Event log file from path

c#,windows,logging,event-log
My question is very similar to this one How do you open the event log programatically? Except i'm logging anything. I need to create db of Log Entries from multiple unconnected machines. I get .evtx files then i try to process them. Right now i'm doing it from exported xml...

Python Twisted - How to set log levels for twisted.logger

python,logging,twisted
Twisted recently came out with a new logging module: twisted.logger. I've read through the documentation[1], but I haven't been able to find where one sets the actual log level. The section on log observers[2] suggests that you might configure a predicate to do this if you are explicitly configuring your...

disable messages.log and nioneo_logial.log.* in graph.db | Neo4j, Java

java,logging,neo4j
I am using Neo4j (edit: 2.1.2) from Java and graph.db folder grows huge (more than I can afford to store) while continuously writing data. I have reached more than 40 GB. I've noticed that if I copy elsewhere the graph.db directory without messages.log and without all nioneo_logial.log.* files, the database...

Logging large messages with node-bunyan-syslog

node.js,sockets,logging,syslog,bunyan
I'm using node-bunyan-syslog to provide syslog streaming for my node application's Bunyan logger, which seems to be a commonly used library for syslog logging in node applications. Here's my basic logger implementation: var bunyan = require('bunyan'); var syslog = require('bunyan-syslog'); var syslogStream = syslog.createBunyanStream({ host: 'my.remote.host', port: 514, type: 'udp'...

C++ Have lone executable log exceptions?

c++,debugging,exception,logging
I'm currently in a beta testing phase of my C++ Server. I'm sending it out to users to stress test it to see if an exceptions show up. However, since the .exe is a standalone, how do I make it so it automatically creates a dump or a log of...

Node fs.watch to read changes only

node.js,logging,fs
fs.watch('log-file', function(event, filename) {}); only returns the file name that was changed. Is it possible to only get what was actually changed? I don't want to read the entire file, and rather want to know what was modified from my file (in my case, there is always addition to a...

How to log from within a logback configuration object

java,logging,logback
I'm implementing my own TurboFilter and I'm wondering how to log from within this class. I can't use the logback's Logger because it calls my turbo filter and so I'll get the java.lang.StackOverflowError. Is there any recommendation how to log inside logback configuration classes? I notice there are methods 'addInfo,...

Custom Log Handler using HTTP PUT Method and creates loop

java,java-ee,logging,bluemix
i working on a Java Webservice. We want to build our own Custom Log Service on Bluemix. To use the log service i created a custom Log handler. The log handler builds the request in the publish method and then try to send via http put method the log to...

How to write log inside my rubygem that will be used in a rails app?

ruby-on-rails,ruby,logging
I'm developing a rubygem that will be used in a rails app. In this rubygem i need to log some information (warnings, errors...). I saw some gems to do this, like logging, but apparently i need no configure the log output (stdout, some file). My rails app log the messages...

refactor 'execute and log' pattern

c++,c,function,logging,refactoring
I found myself keep following the same pattern again and again: if((return_code = doFoo1(...)) != CODE_OK) { log("useful log message based on return code"); // very likely to return an error code. } // continue if((return_code = doFoo2(...)) != CODE_OK) { log("useful log message based on return code"); // very...

django logging - only logs warning and error

python,django,logging
django 1.8 python 2.7 i'm trying to configure django to capture debug and info log messages. i have 2 handlers. but they only seem to want to capture warning and error messages. this is my config. Can someone help point out the silly mistake i've probably made but can't figure...

Spring's @PreDestroy results in logging randomly not logging

java,spring,logging
I'm using Spring, and on termination I'm having @PreDestroy clean up beans. I don't understand why logging randomly succeeds sometimes, and fails on others. // Using Log4j2 Logger log = LogManager.getLogger(MyClass.class); @PreDestroy public void close() { log.warn("Test"); } Sometimes I will get nothing (no "Test" is logged), other times I...

Logging with log4j2 in Spring Boot app

java,spring,maven,logging,log4j2
I am trying to learn Spring Boot. But I completely mess up with a loggers dependencies. I have a simple pom: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!-- Logging --> <dependency>...

Logging all network traffic in Spring mvc

java,spring,spring-mvc,logging,slf4j
I have spring mvc application using RequestBody and ResponseBody annotations. They are configured with MappingJackson2HttpMessageConverter. I also have slf4j set up. I would like to log all json as it comes in and out from my controller. I did extend MappingJackson2HttpMessageConverter @Override public Object read(Type type, Class<?> contextClass, HttpInputMessage inputMessage)...

Escape symbols shown in “git log view” (C-x v l) in Emacs

git,logging,emacs,escaping
When doing C-x v l on a Git versioned file in Emacs, I get its recent history but with escape symbols ^[[... See http://screencast.com/t/x1YWh4GKZR. What's wrong in my config?...

How to customize logging for Google App Engine Java?

java,google-app-engine,logging
Google App Engine Java uses java.util.logging to create logging messages. I want to modify the log messages, that are displayed in Developers Console - Monitoring - Logs. The idea is to add some additional output like username without putting it in each log message manually: log.info("user action"); should result in...

How to use the org.apache.mesos.Log?

logging,mesos
I want to get the mesos logs by org.apache.mesos.Log , but the API is too little about it. I don't know How to use the "Writer" and the "Reader". When I create a new Log, there are some files created, but I don't even know what does it mean. Is...

Pass a Mongoose object thru middleware in Express

node.js,mongodb,logging,express
I have set up a basic logger Mongoose DB objects that I want to pass true the middleware and update it/edit it as the app progresses or specific conditions. Logger middleware. function Logger(req, res, next) { Logs.findOne({ip:func.GIP(req)},function (err, log){ if (err) console.log(err); if (!log) { var log = new Logs({ip:...

slf4j trace vs debug used with log4j

java,logging,log4j,slf4j
From the log4j documentation I know that these are the levels in the h http://logging.apache.org/log4j/1.2/manual.html TRACE, DEBUG, INFO, WARN, ERROR and FATAL Fatal being the top level. But could not understand the difference between Trace and debug. I have tried with setting the log level to debug and I can...

Logging operations in lightadmin

java,spring,logging,lightadmin
I have a Java web application which use Spring and Hibernate and I plan to use lightadmin to provide an administration interface. However, I found very little information about the logging part of lightadmin : if I have such an adminsitration interface, I would like that any operation made to...

Hazelcast: programmatic configuration for logging in debug mode

java,logging,hazelcast
Trying to configure slf4j to log in DEBUG mode, but get only INFO logs. What am I doing wrong? Config hazelcastConfig = new Config("HazelcastConfig"); hazelcastConfig.getProperties().put("hazelcast.logging.type", "sl4j"); hazelcastConfig.getProperties().put("slf4j.logger.com.hazelcast", "debug"); Hazelcast.newHazelcastInstance(hazelcastConfig); ...

Vagrant: How to set default log level for Puppet?

logging,vagrant,puppet
I use Puppet as provisioner within Vagrant. I'd like to see only "warn" and higher log level output on puppet's console output. Is it possible to configure the default log level [1] for Puppet in Vagrant to "warn"? Does this affect the console output? [1] https://docs.puppetlabs.com/references/latest/configuration.html#loglevel...

Logging error when executing Maven SonarQube plugin

maven,logging,sonarqube
I've been facing an issue with Maven SonarQube plugin (v2.6) when Maven version is recent (strictly larger than 3.1). Here is what I run: mvn clean verify -Psonar mvn org.codehaus.mojo:sonar-maven-plugin:2.6:sonar -Psonar The first invocation makes sure sources are compiled and JaCoCo agent is prepared. The interesting part comes, when the...

I created my own logger in Java. Is it a bad idea? [closed]

java,logging,xpages,lotus-notes
I'm developing a web crawler using Java and XPages. I have had a lot of compatibility issues between log libraries like SLF4J, Log4J, java.util.logging, etc. and Lotus Notes. So, I developed my own very simple logger class. import java.io.PrintWriter; import java.util.Calendar; import org.apache.commons.lang3.exception.ExceptionUtils; public class Logger { private static final...

C++ on Linux - How do I #define a #ifdef / #endif debug conditional

c++,debugging,logging,c-preprocessor
I want to trace my code if DEBUG is defined, as in the following #ifdef code block: #ifdef DEBUG OP_LOG(debug) << "SEQUENCE: " __FILE__ << "::" << __FUNCTION__; #endif Someone said I could use a #define so that the above three lines would only be one line instead. This is...

Stop Log from Outputting in py2neo

logging,neo4j,py2neo
How can I stop py2neo from spitting out each created relationship/node, like the following: (http://localhost:7474/db/data/' ref=u'relationship/13441' start=u'node/13446' end=u'node/3' type=u'IN' properties={}>,) As encouraged by this page, when I set the below line to OFF java.util.logging.ConsoleHandler.level=OFF I silence logging when I call a function which creates the relationship/node. However, if I directly...

Issues creating login button using Facebook SDK 4.1.2

android,facebook,logging
I am trying to create an application, which will allow users to sign in via their Facebook accounts. I wanted to use the new Facebook SDK 4.1.2 via eclipse. To use the new SDK in eclipse, I followed this tutorial. I am now able to remove all the errors from...

How can I read the logExtFileFlags from the “Default” site?

c#,asp.net,logging,iis-7
I am attempting to read IIS 7 configuration data remotely, specifically the logExtFileFlags from the Default site. When I look at the applicationHost.config on the remote server, I see the information in question: <system.applicationHost> <sites> <site name="Default" id="1" serverAutoStart="true"> <logFile logExtFileFlags="Date, Time, ClientIP, UserName, SeverIP, Method, UriStem, URIQuery, HttpStatus, TimeTaken,...

log4j creates log file but does not write the messages that I am creating

java,logging,log4j,filewriter
Log file is getting created and logs are getting written into it.But , it doesn't write the things that i specify in LOG.trace("") and LOG.error("") etc. log4j.rootLogger=INFO,R # Direct log messages to stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}%-5p %c{1}:%L - %m%n log4j.appender.R=org.apache.log4j.RollingFileAppender...

Azure - Enable diagnostics for worker/web role

azure,logging,azure-diagnostics
I would like to log every exception that occurs, (MVC cloudapp), in my table storage. I followed an official tutorial from Microsoft but it seems like they just complicate things too much. Tutorial can be viewed here: https://azure.microsoft.com/sv-se/documentation/articles/cloud-services-dotnet-diagnostics/#how-to-enable-diagnostics-in-a-worker-role It just feels like it's too much of a hassle just because...

Right way to configure the log in Wildfly 8.2

java,logging,jboss,wildfly,wildfly-8
I have confusion in setting up the log in Wildfly-8.2.0. Initially I had used my own logging system, with log4j.xml built into the WAR file, all worked very well. But, when I make any changes to the log configuration I need to redeploy the app to make the changes effect....

Scala slf4j dynamic file name

scala,logging,slf4j
I just successfully added Grizzled-SLF4J logger to my project using this link http://alvinalexander.com/scala/how-to-log-output-file-grizzled-slf4j-scala-simplelogger.properties But using this properties, there is no option to create dynamic file name: org.slf4j.simpleLogger.logFile = /tmp/myapp.log org.slf4j.simpleLogger.defaultLogLevel = info org.slf4j.simpleLogger.showDateTime = true org.slf4j.simpleLogger.dateTimeFormat = yyyy'/'MM'/'dd' 'HH':'mm':'ss'-'S org.slf4j.simpleLogger.showThreadName = true...

how to keep curl from deleteing log.txt when adding new entry?

bash,curl,logging
I am trying to do: create a bash script that downloads the Ubuntu iso and a file from my own ftp server. Then do a traceroute to my server and save route/date and avg speed of the two downloads to log.txt. Where i am stuck: This seems to do okay...

Logger logs 2 times instead of one time because of copy

c++,logging,copy,move
I am writing my own Logger. I know there are alot out there but i would like to write it myself. It has messages which get logged when they are leaving the scope. So if i call Logger::Error(__FILE__,__LINE__) << "some error" it gets logged directly since there is no assignemnt...

Grep between some period

linux,logging,grep
I have large log file, in which each record starts with date, formatted like this: [2014-10-06 07:03:49] What`s the easiest way to grep by specific period of time ? I want to grep by specific date range, for example, taking the example date, from 06.10.2014 to 08.10.2014. ...

Spring Boot Logger Aspects

java,spring,logging,aop,aspect
I'm having problems getting my logging aspect to log information when methods from classes of a particular package are accessed. In other words, "no" logging occurs. I even got desperate and added System.out.println statements, with no luck. All of my classes are located under the org.my.package package, i.e. org.my.package.controller, org.my.package.model,...

Google Play Game Service Check user logged in or not Unity3d

android,authentication,logging,unity3d,google-play-games
I want to check user has been logged in or not if it has been logged in then i will check for achievement. I have written like this : void Update() { Social.localUser.Authenticate((bool success) => { Social.ReportProgress("Cfjewijawiu_QA", 100.0f, (bool success) => { // handle success or failure }); }); }...

How to block writes to standard output in java (System.out.println())

java,logging,stdout
In Java, how to block code from writing to system out? My app calls a 3rd party library that spams logs by issuing numerous System.out.println() calls. I don't have legal rights to decompile and patch the library. I'm running Websphere 8.5.x Considered using System.setOut(PrintStream out), but that will effect the...

Log4j - log ALL levels except ERROR

logging,log4j
Is there any way to achieve it? I mean what I want in my application is that it should log messages from all levels including debug and trace logs. The obvious way to achieve this is to set level to ALL. But I don't want to see any log of...

Is it a good practice to send with the logger between methods and classes?

logging
I am in this project where all the methods takes a logger and a string saying what is happening. For examle doFoo(Logger log, String doingBar, Object foo, Object bar). After that it is usualy some log messages printing doingBar + some more. So the objects foo and bar is what...

Antlr4 token existence messing up parsing

parsing,logging,compiler-construction,antlr,antlr4
first time poster so my greatest apologies if I break the rules. I'm using Antlr4 to create a log parser and I'm running into some issues that I don't understand. I'm trying to parse the following input log sequence: USA1-RR-SRX240-EDGE-01 created 10.20.30.40/50985->11.12.13.14/443 With the following grammar: grammar Juniper; WS :...

Distributed file system for linux [closed]

linux,database,logging,gridfs
I've got a web app where I use plain file system for my custom logs - a lot of small files, I don't want to put that into db, that works for me quite well. But now I need to scale my app by using a load balancer in front,...

Logging Retrofit to Logback Logger

java,logging,slf4j,logback,retrofit
I'm developing a JAVA client for a REST API. I'm using Retrofit for the client. I see that I can set log level when creating adapter in retrofit. All this log currently goes to console. However, I want to redirect this to the log generated by logback which is already...