But of course, it is like the help in MSDN, which those of us who see the page ratings, see almost all pages are rated, like 1.1...not very helpful. I also went to a Microsoft site which also does not explain in English, where to specify the log file.
They tell us to go to the machine.config file and look for the settings.Um, there ain't no 'listeners' settings in the machine.config files. Why can't they just put the darn thing in the web.config file of the *application*?
Could someone please explain to me how to create a specific Log file for a specific application, using My.Log? How to add the necessary info to your web.config file to use an application log?
Any help much appreciated.
aaava:
Okay, I've been trying to catch up on 2K5. I am confused about the new My.Log. What a great idea! Only one problem. THERE'S NO WAY TO FIND OUT ***WHERE*** THIS LOG FILE IS WRITTEN TO!!! OR SOME SIMPLE WAY TO SET IT!! There IS 'help' on this topic.
But of course, it is like the help in MSDN, which those of us who see the page ratings, see almost all pages are rated, like 1.1...not very helpful. I also went to a Microsoft site which also does not explain in English, where to specify the log file.
They tell us to go to the machine.config file and look for the settings.Um, there ain't no 'listeners' settings in the machine.config files. Why can't they just put the darn thing in the web.config file of the *application*?
Could someone please explain to me how to create a specific Log file for a specific application, using My.Log? How to add the necessary info to your web.config file to use an application log?
Any help much appreciated.
Bump. Anyone here know any info about the My.Log?
aaava:
Okay, I've been trying to catch up on 2K5. I am confused about the new My.Log. What a great idea! Only one problem. THERE'S NO WAY TO FIND OUT ***WHERE*** THIS LOG FILE IS WRITTEN TO!!! OR SOME SIMPLE WAY TO SET IT!! There IS 'help' on this topic.
But of course, it is like the help in MSDN, which those of us who see the page ratings, see almost all pages are rated, like 1.1...not very helpful. I also went to a Microsoft site which also does not explain in English, where to specify the log file.
They tell us to go to the machine.config file and look for the settings. Um, there ain't no 'listeners' settings in the machine.config files. Why can't they just put the darn thing in the web.config file of the *application*?
Could someone please explain to me how to create a specific Log file for a specific application, using My.Log? How to add the necessary info to your web.config file to use an application log?
Any help much appreciated.
It's not machine.config, it's normally{application}.config where the listeners are configured. Only if that doesn't exist is machine.config used. Have you configured a listener? Might want to look at:
http://msdn2.microsoft.com/en-us/yhx0xwks.aspx
Jeff
Hey Jeff:
Thanks! That's exactly what I was looking for. Appreciate you spending the time...
Well, there's only one problem with that tutorial page--there is no app.config in my project, nor does one show up when I click on 'Add New Item'. Of course, this is a web project, not an app project.
Doesn *anyone* know how I go about setting up the web.config to handle log files that can be used in My.Computer.Log?
I cannot find anything on the web, and it's now been two weeks of on and off searching for anyone, someone who has an answer for this.
Thanks in advance...best would be a page that has a tutorial. Barring that, at least the web.config 'lines' I would need to customize my log listener. Can't believe microsoft adds these things, then offers zero help in MSDN or anywhere online to implement it. Makes it kind of pointless in reality...
Well its a couple of years too late, but I've come across the same issue. The help files have improved a bit, but there's still no information aimed at the my.log object configuration on a .NET web site.
I've had great success with copying an app.config file's my.application.log configuration section from a windows application into a web.config file. I'm not sure if that's the right thing to do, but it works like a charm! Here's a quick example that should be pasted right below the <configuration> tag. Please note that I'm logging to the system's event log, which requires special permissions. It much easier to write to a local log file instead of the event log.
<
configuration><!--
Begining of my.Log section--><
system.diagnostics><
sources><!--
This section defines the logging configuration for My.Application.Log--><
sourcename="DefaultSource"switchName="DefaultSwitch"><
listeners><!--
<add name="FileLog"/>--><!--
Uncomment the below section to write to the Application Event Log--><
addname="EventLog"/></
listeners></
source></
sources><
switches><
addname="DefaultSwitch"value="Information" /></
switches><
sharedListeners><!--
<add name="FileLog"type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
--><!--
Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log--><
addname="EventLog"type="System.Diagnostics.EventLogTraceListener"initializeData="ZCoffee Web Site"/></
sharedListeners></
system.diagnostics>...</configuration>
Johnny
0 comments:
Post a Comment