Search Results

Search found 4489 results on 180 pages for 'logging'.

Page 9/180 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Which logging library to use for cross-language (Java, C++, Python) system

    - by recipriversexclusion
    I have a system where a central Java controller launches analysis processes, which may be written in C++, Java, or Python (mostly they are C++). All these processes currently run on the same server. What are you suggestions to Create a central log to which all processes can write to What if in the future I push some processes to another server. How can I support distributed logging? Thanks!

    Read the article

  • Asp.Net MVC Error Handling & logging

    - by Navish Rampal
    I am trying to Catch exceptions and log it. Presently I have written a Utility method and Passing the Exception to it in the catch block and finally logging the application using MS Enterprise Library 4.0. I want to know is there any other better way to log errors. Show exception message in the same view for some type of exceptions for rest navigate to error page. If someone can help me on this! Navish

    Read the article

  • Who use syslog for logging his web application

    - by user137246
    I was wondering if somebody use syslog to log his web application errors/warning/info ? It could be quite useful in a deployment environment with a lot of servers. If yes, what kind of client visualisation you can get to watch errors and grouping the same errors into batch? Do you use other techniques than syslog to achieve this kind of logging functionality?

    Read the article

  • Create a new log file every time my program is run

    - by Bernhard V
    Hi, I am using the Apache commons logging library and log4j to generate my log files. Now I want to create a new file every time I run my program. The current count should be appended to the log file's name. For example: program_1.log program_2.log program_3.log Do you know how I could achieve this?

    Read the article

  • Java Audit table logging, MySQL equivalent of CONTEXT_INFO.

    - by Julia
    Hi, I am looking for the MySQL equivalent of CONTEXT_INFO that is present in SQL Server. Or any other session variable like thing using which I can pass the username to the trigger. I am currently working on logging table data for audit. I need to pass the username of the logged in user to the delete trigger. Any ideas? We are deleting the rows from the table in a few cases and marking them as deleted in others. Any alternate solutions are welcome. I thought of using AOP but it could prove problematic when deleting a cascade. I want to look into Hibernate Interceptors, not sure at this point if that works. If I can find the MySQL equivalent of CONTEXT_INFO, my job is done and elegant as well. Thanks, Julia.

    Read the article

  • Survey on logging classes / frameworks / writers

    - by ts
    I am curious what writers (handlers, loggers) are you using. Text file and db its quite obvious, but what are other possibilities ? Firephp maybe (as in Zend_Log), mail, jabber, url ? Is anyone using syslog() or error_log() ? Are you using streams (especially custom ones) ? Are you using custom error levels or you limit yourself to predefined values? Are you logging common php errors / warning / notices? And last question - is there anything new in the town, worth consideration, apart of Zend_Log ? Or are you using your homebrew class?

    Read the article

  • Elmah is only logging 15 Errors

    - by Ev
    Hi, I've just starting looking at a site in place at work. They're using Elmah to log errors. It seems to be logging fine, but in the web interface, when I tell Elmah to show me 100 errors per page, it only shows the most recent 15. Then when I click on "Download Log" I only get shown 15 errors in the CSV. Anyone know how I can configure it to keep all the errors? Or can someone point me to some docs on how to do this? Thanks a lot! -Evan

    Read the article

  • Is it professional to have funny looking logging messages

    - by JCH
    Hi, Recently I have joined a new project team where in the java application logs have logged messages in a non-formal way[can't think of suitable word]. here how they look :-) <message> for info messages :-| <message> for warn :-( <message> for error besides there's also ASCII art drawing , different one for each log when that particular service starts up or is killed .And there many more styles for certain application events. iam not sure if it has any significant overhead on the application or not. I would like to ask you folks if you come across such unique styles of logging messages or do you also practice any styles.what is your opinion about it. BR /jon

    Read the article

  • Best Practices - Stored Procedure Logging

    - by hgulyan
    If you have a long running SP, do you log somehow it's actions or just wait for this message? "Command(s) completed successfully." I assume, that there can be plenty solutions on this subject, but is there any best practice - a simple solution that is frequently used? EDIT I've found an interesting link on this subject http://weblogs.sqlteam.com/brettk/archive/2006/09/21/12391.aspx Article describes using a log table, but there's an issue The logging procedure must be executed outside of any transaction I can't call that insert outside, because of cursor that I use and insert a line to that table on every row. Any ideas?

    Read the article

  • Trouble enabling Grails logging

    - by Dave
    I have this logging configuration in my Config.groovy file. This is a development environment, started as such. I have verified the file exists and there are 775 perms on the file, but nothing is getting output to the file. // set per-environment serverURL stem for creating absolute links environments { production { grails.serverURL = "http://www.changeme.com" } development { grails.serverURL = "http://localhost:8080/${appName}" logFilePath = "/Users/davea/Tomcat/logs/log4j.log" } test { grails.serverURL = "http://localhost:8080/${appName}" } } // log4j configuration log4j = { console name:'Appender1', layout:pattern(conversionPattern: '%-4r [%t] %-5p %c %x - %m%n') rollingFile name:'Appender2', maxFileSize:1024 * 1024, file:logFilePath, layout:pattern(conversionPattern: '%-4r [%t] %-5p %c %x - %m%n') root { debug 'Appender1', 'Appender2' } } Can anyone tell what's wrong with my configuration? Thanks, - Dave

    Read the article

  • Logging extra fields with Elmah Error Table?

    - by VJ
    I want to add my own session variable to elmah error log table and display it. I already have modified the source code and added the new fields to Error.cs and other fields but I don't know but when I assign an HttpContext.Current.Session["MyVar"].tostring() value to my field in the constructor it stops logging exceptions and does not log any exception. I just need to get the value of the session variable is there other way for this. I read a post which he added fields for the email but it does not say where exactly should I get the session value.

    Read the article

  • Logging which is the best way

    - by Tony
    Hi People who talk about loggers here never talke about EventLog, I think this is good for windows system. Is it reliable, or I found it dead in some bad morning? Why not logging everything at SQLServer, I am creating E-Commerce website, if SQL server down the website will be down anyway. but I am worry about temporally connection failure, what do u think? Why everyone like files, it can be in great size, too big to handle, or maybe I will create another file when a file is too big, and I can create a file with a date. Some one tried MS Enterprise library? talk to me about it. Thanks

    Read the article

  • Logging into table in MS SQL trigger

    - by Martin
    I am coding MS SQL 2005 trigger. I want to make some logging during trigger execution, using INSERT statement into my log table. When there occurs error during execution, I want to raise error and cancel action that cause trigger execution, but not to lose log records. What is the best way to achieve this? Now my trigger logs everything except situation when there is error - because of ROLLBACK. RAISERROR statement is needed in order to inform calling program about error. Now, my error handling code looks like: if (@err = 1) begin INSERT INTO dbo.log(date, entry) SELECT getdate(), 'ERROR: ' + out from #output RAISERROR (@msg, 16, 1) rollback transaction return end

    Read the article

  • Logging fatal/parse errors in PHP5

    - by PeterBelm
    I'm writing an error logging service that will be integrated into websites running on my server, that will email me error batches, etc. So I've been trying to find out if there's a way to handle fatal and parse errors, however not using the tricks to handle it in PHP code (output buffer, shutdown function). I'm quite happy to write some C code or something to handle it outside of my PHP code. I would also like to issue a redirect if possible (my sites use output buffering so there shouldn't be any headers sent). I'm pretty sure this could be done with a PHP module, but I've never written one and have no idea where to start.

    Read the article

  • Microsoft Enterprise Logging Application Block - Reading Log File

    - by Or A
    Hi, I'm using MS log application block for logging my application event into a file called app-trace.log which located on the c:\temp folder. I'm trying to find the best way to read this file at runtime and display it when the user asks for it. now i have 2 issues: it seems that this kind of feature is not supported by the framework, hence i have to write this reader myself. am i missing something here? is there any better way of getting this data (w/o buffering it in the memory or saving it into another file). if i'm taking the only alternative that left for me, and implementing the reader myself, when i'm tring to do: System.IO.FileStream fs = new System.IO.FileStream(@"c:\temp\app-trace.log", FileMode.Open, FileAccess.Read); i'm getting "File being used by another process c#", probably the file is locked by the application block. is there any way to access and read it anyhow? Thank

    Read the article

  • android logging sdcard

    - by Abhi Rao
    Hello, With Android-Emulator I am not able to write/create a file on the SD Card (for logging). Here is what I have done so far - Run mksdcard 8192K C:\android-dev\emu_sdcard\emu_logFile - Create a new AVD, when assign emu_logFile to it so that when I view the AVD Details it says C:\android-dev\emu_sdcard\emu_logFile against the field "SD Card" - Here is the relevant code public class ZLogger { static PrintWriter zLogWriter = null; private static void Initialize() { try { File sdDir = Environment.getExternalStorageDirectory(); if (sdDir.canWrite()) { : File logFile = new File (sdDir, VERSION.RELEASE + "_" + ".log"); FileWriter logFileWriter = new FileWriter(logFile); zLogWriter = new PrintWriter(logFileWriter); zLogWriter.write("\n\n - " + date + " - \n"); } } catch (IOException e) { Log.e("ZLogger", "Count not write to file: " + e.getMessage()); } } sdDir.canWrite returns false - please note it not the exception from adb shell when I do ls I see sdcard as link to /mnt/sdcard. When I do ls -l /mnt here is what I see ls -l /mnt ls -l /mnt drwxr-xr-x root system 2010-12-24 03:41 asec drwx------ root root 2010-12-24 03:41 secure d--------- system system 2010-12-24 03:41 sdcard whereas if I go to the directory where I created emu_sdcard - I see a lock has been issued, as shown here C:dir android-dev\emu_sdcard Volume in drive C is Preload Volume Serial Number is A4F3-6C29 Directory of C:\android-dev\emu_sdcard 12/24/2010 03:41 AM . 12/24/2010 03:41 AM .. 12/24/2010 03:17 AM 8,388,608 emu_logFile 12/24/2010 03:41 AM emu_logFile.lock 1 File(s) 8,388,608 bytes 3 Dir(s) 50,347,704,320 bytes free I have looked at these and other SO questions Android Emulator sdcard push error: Read-only file system (2) Not able to view SDCard folder in the FileExplorer of Android Eclipse I have added the following to AndroidManifest.xml **uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" ** Please let me know your thoughts - what am I missing here? Why does canWrite return false? What should I do to add permissions to sdcard?

    Read the article

  • Turning off hibernate logging console output

    - by Jared
    I'm using hibernate 3 and want to stop it from dumping all the startup messages to the console. I tried commenting out the stdout lines in log4j.properties but no luck. I've pasted my log file below. Also I'm using eclipse with the standard project structure and have a copy of log4j.properties in both the root of the project folder and the bin folder. ### 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{ABSOLUTE} %5p %c{1}:%L - %m%n ### direct messages to file hibernate.log ### log4j.appender.file=org.apache.log4j.FileAppender log4j.appender.file.File=hibernate.log log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n ### set log levels - for more verbose logging change 'info' to 'debug' ### log4j.rootLogger=warn, stdout #log4j.logger.org.hibernate=info log4j.logger.org.hibernate=debug ### log HQL query parser activity #log4j.logger.org.hibernate.hql.ast.AST=debug ### log just the SQL #log4j.logger.org.hibernate.SQL=debug ### log JDBC bind parameters ### log4j.logger.org.hibernate.type=info #log4j.logger.org.hibernate.type=debug ### log schema export/update ### log4j.logger.org.hibernate.tool.hbm2ddl=debug ### log HQL parse trees #log4j.logger.org.hibernate.hql=debug ### log cache activity ### #log4j.logger.org.hibernate.cache=debug ### log transaction activity #log4j.logger.org.hibernate.transaction=debug ### log JDBC resource acquisition #log4j.logger.org.hibernate.jdbc=debug ### enable the following line if you want to track down connection ### ### leakages when using DriverManagerConnectionProvider ### #log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trac5

    Read the article

  • Logging exceptions during bean injection

    - by Marc W
    I think this is a pretty basic question, but after Googling around I can't seem to find the answer. What I need is a way to log some custom output with log4j during Spring bean construction. I have a factory class called ResponderFactory (being used as an instance factory in Spring) with a factory method that can throw 2 different types of exception. public CollectorResponder collectorResponder(String inputQueueName) throws ConfigurationException, BrokerConnectionException {} Now, normally I could wrap a call to this method in a try-catch block with 2 catch clauses to handle the logging situations for each of the exceptions. However, if I'm using Spring to inject this CollectorResponder, created with the factory, into another class I don't see how this is possible. <bean id="responderFactory" class="com.package.ResponderFactory"> <constructor-arg index="0" ref="basicDispatcher" /> <constructor-arg index="1" value="http://localhost:9000" /> </bean> <bean id="collectorResponder" class="com.package.CollectorResponder" factory-bean="responderFactory" factory-method="collectorResponder"> <constructor-arg value="collector.in" /> </bean> <bean id="collectorConsumer" class="com.package.CollectorConsumer"> <constructor-arg ref="collectorResponder" /> </bean> Again, I want to catch these exceptions when the collectorResponder bean is instantiated. Right now I'm dealing with this is CollectorConsumer when I instantiate using new CollectorResponder(...). Is there any way I can do this?

    Read the article

  • Logging exceptions to database in NServiceBus

    - by IGoor
    If an exception occurs in my MessageHandler I want to write the exception details to my database. How do I do this? Obviously, I cant just catch the exception, write to database, and rethrow it since NSB rollbacks all changes. (IsTransactional is set to true) I tried adding logging functionality in a seperate handler, which I caledl using SendLocal if an exception occured, but this does not work: public void Handle(MessageItem message) { try { DoWork(); } catch(Exception exc) { Bus.SendLocal(new ExceptionMessage(exc.Message)); throw; } } I also tried using Log4Net with a custom appender, but this also rolled back. Configure.With() .Log4Net<DatabaseAppender>(a => a.Log = "Log") appender: public class DatabaseAppender : log4net.Appender.AppenderSkeleton { public string Log { get; set; } protected override void Append(log4net.Core.LoggingEvent loggingEvent) { if (loggingEvent.ExceptionObject != null) WriteToDatabase(loggingEvent.ExceptionObject); } } Is there anyway to log unhandled exceptions in the messagehandler when IsTransactional is true? Thanks in advance.

    Read the article

  • Best practice - logging events (general) and changes (database)

    - by b0x0rz
    need help with logging all activities on a site as well as database changes. requirements: * should be in database * should be easily searchable by initiator (user name / session id), event (activity type) and event parameters i can think of a database design but either it involves a lot of tables (one per event) so i can log each of the parameters of an event in a separate field OR it involves one table with generic fields (7 int numeric and 7 text types) and log everything in one table with event type field determining what parameter got written where (and hoping that i don't need more than 7 fields of a certain type, or 8 or 9 or whatever number i choose)... example of entries (the usual things): [username] login failed @datetime [username] login successful @datetime [username] changed password @datetime, estimated security of password [low/ok/high/perfect] @datetime [username] clicked result [result number] [result id] after searching for [search string] and got [number of results] @datetime [username] clicked result [result number] [result id] after searching for [search string] and got [number of results] @datetime [username] changed profile name from [old name] to [new name] @datetime [username] verified name with [credit card type] credit card @datetime datbase table [table name] purged of old entries @datetime via automated process etc... so anyone dealt with this before? any best practices / links you can share? i've seen it done with the generic solution mentioned above, but somehow that goes against what i learned from database design, but as you can see the sheer number of events that need to be trackable (each user will be able to see this info) is giving me headaches, BUT i do LOVE the one event per table solution more than the generic one. any thoughts? edit: also, is there maybe an authoritative list of such (likely) events somewhere? thnx stack overflow says: the question you're asking appears subjective and is likely to be closed. my answer: probably is subjective, but it is directly related to my issue i have with designing a database / writing my code, so i'd welcome any help. also i tried narrowing down the ideas to 2 so hopefully one of these will prevail, unless there already is an established solution for these kinds of things.

    Read the article

  • Looking for: nosql (redis/mongodb) based event logging for Django

    - by Parand
    I'm looking for a flexible event logging platform to store both pre-defined (username, ip address) and non-pre-defined (can be generated as needed by any piece of code) events for Django. I'm currently doing some of this with log files, but it ends up requiring various analysis scripts and ends up in a DB anyway, so I'm considering throwing it immediately into a nosql store such as MongoDB or Redis. The idea is to be easily able to query, for example, which ip address the user most commonly comes from, whether the user has ever performed some action, lookup the outcome for a specific event, etc. Is there something that already does this? If not, I'm thinking of this: The "event" is a dictionary attached to the request object. Middleware fills in various pieces (username, ip, sql timing), code fills in the rest as needed. After the request is served a post-request hook drops the event into mongodb/redis, normalizing various fields (eg. incrementing the username:ip address counter) and dropping the rest in as is. Words of wisdom / pointers to code that does some/all of this would be appreciated.

    Read the article

  • Ask Basic Configurator in Apache Commong Log

    - by adisembiring
    I use log4j as logger for my web application. in log4j, I can set the level log in log4j properties or log4j.xml. in log4j, we instance logger as follows: static Logger logger = Logger.getLogger(SomeClass.class); I init log4j basic configurator in a servlet file using init method. But, I usually test application using JUnit, So I init the basic configurator in setup method. after that, I test the application, and I can see the log. Because I deployed, the web in websphere. I change all of logging instance become: private Log log = LogFactory.getLog(Foo.class); I don't know how to load basic configurator using ACL. so I can't control debug level to my JUnit test. do you have any suggestion, without changing static Logger logger = Logger.getLogger(SomeClass.class); become static Logger logger = Logger.getLogger(SomeClass.class);

    Read the article

  • Logging raw HTTP request/response in ASP.NET MVC & IIS7

    - by Greg Beech
    I'm writing a web service (using ASP.NET MVC) and for support purposes we'd like to be able to log the requests and response in as close as possible to the raw, on-the-wire format (i.e including HTTP method, path, all headers, and the body) into a database. What I'm not sure of is how to get hold of this data in the least 'mangled' way. I can re-constitute what I believe the request looks like by inspecting all the properties of the HttpRequest object and building a string from them (and similarly for the response) but I'd really like to get hold of the actual request/response data that's sent on the wire. I'm happy to use any interception mechanism such as filters, modules, etc. and the solution can be specific to IIS7. However, I'd prefer to keep it in managed code only. Any recommendations? Edit: I note that HttpRequest has a SaveAs method which can save the request to disk but this reconstructs the request from the internal state using a load of internal helper methods that cannot be accessed publicly (quite why this doesn't allow saving to a user-provided stream I don't know). So it's starting to look like I'll have to do my best to reconstruct the request/response text from the objects... groan. Edit 2: Please note that I said the whole request including method, path, headers etc. The current responses only look at the body streams which does not include this information. Edit 3: Does nobody read questions around here? Five answers so far and yet not one even hints at a way to get the whole raw on-the-wire request. Yes, I know I can capture the output streams and the headers and the URL and all that stuff from the request object. I already said that in the question, see: I can re-constitute what I believe the request looks like by inspecting all the properties of the HttpRequest object and building a string from them (and similarly for the response) but I'd really like to get hold of the actual request/response data that's sent on the wire. If you know the complete raw data (including headers, url, http method, etc.) simply cannot be retrieved then that would be useful to know. Similarly if you know how to get it all in the raw format (yes, I still mean including headers, url, http method, etc.) without having to reconstruct it, which is what I asked, then that would be very useful. But telling me that I can reconstruct it from the HttpRequest/HttpResponse objects is not useful. I know that. I already said it. Please note: Before anybody starts saying this is a bad idea, or will limit scalability, etc., we'll also be implementing throttling, sequential delivery, and anti-replay mechanisms in a distributed environment, so database logging is required anyway. I'm not looking for a discussion of whether this is a good idea, I'm looking for how it can be done.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >