Questions tagged [logging-application-block]

29 questions
6
votes
1 answer

What is the LogWriter.ShouldLog(LogEntry) method behaviour based on?

What is the LogWriter.ShouldLog(..) method behaviour based on? Or what is the real intention of its usage? Its documentation page is rather sparse and doesn't provide much insight. Quoting it: Queries whether a LogEntry shold[sic] be …
John K
  • 28,441
  • 31
  • 139
  • 229
6
votes
1 answer

EntLib5: Loggin application block not logging to Event Log (exception: type LogWriter cannot be constructed)- Can anyone help?

HI there, I just setup the logging application block part of Enterprise Library 5. I think i have done it correct but its not logging to the event log it errors on the write method and gives me the following exception. The type LogWriter cannot…
4
votes
2 answers

logging stack trace with logger

I am using Logging Application block with C#.Net 2.0. My code is logging the error information to a flat file. I have set all required configuration in web.config like listeners, formatters and categories, etc as described in msdn and it is working…
Anil Soman
  • 2,443
  • 7
  • 40
  • 64
3
votes
1 answer

Multiple Processes using one Logging Application Block log file

We use the logging application block in our ASP.NET 2.0 application which is called in the following way: public class BaseLogEntry : LogEntry { public void CloseLog() { try { Logger.Writer.Dispose(); } …
3
votes
1 answer

Is there a log viewer application that can read log messages from Azure Table Storage?

Microsoft recently released Enterprise Library 6 which contains the new Semantic Logging Block. One of the options available with the Semantic Logging Block is the ability to write log messages to Windows Azure Table Storage, which sounds like a…
3
votes
1 answer

Enterprise Library 5.0 Logging - rollInterval

Can the Enterprise Library 5.0 Logging Application Block be configured to roll the log file every day at a specified time (e.g. at 3:00 PM)? The relevant options of rollInterval are day and midnight. I'm not sure what the difference is, but midnight…
2
votes
1 answer

Enterprise framework logging - ShouldLog not working with SourceLevel filter

I'm using EF 5 and am trying to use the ShouldLog method to determine whether a LogEntry will be logged prior to actually logging it. My issue is that ShouldLog always returns true, even if I have a filter in place to exclude certain levels. The…
knms
  • 93
  • 1
  • 1
  • 6
2
votes
3 answers

What logging listener should be used in production? (ASP.NET / Logging Application Block)

I'm using MS Enterprise Logging Application Block in an ASP.NET website. For production launch, I will set up a log listener in one of these locations: Sql Server database Windows event log Text files Which has the least impact on performance? NB…
2
votes
2 answers

How to create database for a Semantic Logging Application Block with SqlDatabaseSink

How to set up the SQL Server database for Semantic logging. Does the table for logging information needs to be created earlier? If yes, what is the schema to be used. I have the following code : var listener = new ObservableEventListener(); string…
2
votes
2 answers

Logging Application Block not logging to a file

I have the following configuration and code, the writer.logentry is not throwing an exception but the file is not created. Update 1: I changed the listener, I removed eventlog and added flat file log. I still cant see a created .log file I suppose I…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
1
vote
1 answer

Logging application block : database trace listener timestamp

I'm logging exception using Microsoft Enterprise Library Logging Application Block. I'm using the database trace listener. Timestamp of the log entry is in UTC time by default. I know I can have the timestamp of local time in the 'FormattedMessage'…
maxence51
  • 994
  • 1
  • 8
  • 20
1
vote
1 answer

How do I specify the Username / Password for my SMTP in the Email Trace Listener used by the MS Entriprise Library Logging Block?

I'm using Enterprise Library 4.1 and I've configured the Logging Application Block to log my errors in my ASP.NET MVC 3 application. Everything works just fine and my errors are currently written to a log. I'd like to also email the errors to…
Justin
  • 10,667
  • 15
  • 58
  • 79
1
vote
2 answers

how to add some properties to log entry

I use Microsoft Enterprise Library 5.0 (Logging Application Block). I want to save IP address and username into database. How can I add these two columns to Logging Application Block? HttpContext _Context = HttpContext.Current; Exception _ex =…
1
vote
2 answers

How to configure EmailTraceListener to avoid over-flooded mailbox (on mass problem)?

How to configure EmailTraceListener to avoid over-flooded mailbox (on mass problem)? Is it possible to setup a maximum for messages sent (per hour/per day) using logging applicaiton block configuration? P.S. I have done it already with some…
Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
1
vote
0 answers

Define when to flush log entries to database in Enterprise Library 4.1

I'm trying to create a custom database trace listener based on the FormattedDatabaseTraceListenerData and I'm having some doubts regarding its performance. What's the best way to cache in-memory logging entries so less transactions/connections to…
LuisF
  • 564
  • 1
  • 7
  • 18
1
2