473,618 Members | 3,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change the write path for My.Application. Log.WriteEntry?

I've been working with the My.Application. Log.WriteEntry method in VB.net
2005 and when it writes a log is stores the log file in the application data
folder under the systems user account. I have tried to find a way to change
this path to save the log to a different location but i can't find it. Has
anyone dealt with this b4? I have read the MSDN documentation and searched
online but have been unsuccesful in finding any way to do this. Any
suggestions?
Jan 13 '06 #1
2 9325
I have always used a simple log routine that writes to a log file in my
application's directory.

Private Sub WriteLogEntry(B yVal msg as String)
dim sw as new StreamWriter(". \myapp.log",Tru e)
sw.writeline(no w.toshortdatest ring & " " & _
now.toshorttime string & " - " & msg)
sw.close
End Sub

*** Sent via Developersdex http://www.developersdex.com ***
Jan 13 '06 #2
Terry thank you for responding to my post.
I agree that your solution for creating my own log files will do what i need
it to do and I will most likely end up doing it that way if i can't find an
answer. I'm specifically interested in the My.Application. Log.WriteEntry to
see if I wanted to change the way i was doing things and while i do like the
method, I don't like that i can't change the path of where it writes the log
and wanted to see if anyone has solved it?

"Terry Olsen" wrote:
I have always used a simple log routine that writes to a log file in my
application's directory.

Private Sub WriteLogEntry(B yVal msg as String)
dim sw as new StreamWriter(". \myapp.log",Tru e)
sw.writeline(no w.toshortdatest ring & " " & _
now.toshorttime string & " - " & msg)
sw.close
End Sub

*** Sent via Developersdex http://www.developersdex.com ***

Jan 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1248
by: Brian Rupert | last post by:
Can someone tell me where this info is? I currently have my ROOT application pool assigned to another web site's path. Not sure how it happened. Is there a way to change this in IIS? Or, can any of these be modified for that matter? I have tried using Windows Explorer and modifying the Sharing Properties page by removing the "wwwroot$" from the Shared As field, but nothing has changed in the IIS Manager Default Application Pool...
1
30650
by: denis_bernicky | last post by:
I have been given a database on a CD to do some work on. The only problem is that when I open a form it tells me that the file path //server/database/mydb.mdb is not valid. Of course it isn't valid the whole thing is on my comp at the moment and not even on a network. How can I change this path so that I can work on the database locally and change it back when I put the changes back? Thank you for any help.
0
2505
by: svilst | last post by:
How can I change the path of the cookie 'ASP.NET_SessionId'? The path is "/" and I'd like to set the path to particular virtual directory. The following approach does not work: protected void Session_Start(Object sender, EventArgs e) { HttpCookie cookie = Response.Cookies; if (cookie != null)
19
40695
by: Ju Hui | last post by:
is python search module by paths in sys.path? how to change it manuallly?
3
18498
by: sk.rasheedfarhan | last post by:
Hi all, According to my project requirement I have to write the NT Event information of SQL Server into EventLog viewer. For more clear I want to write the following information into Application log file: ---------------------------------------------------------------------------­---------------------------
1
2340
by: ABC | last post by:
What is the system requirements to write RFID application using C#?
11
26567
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
2
1837
myusernotyours
by: myusernotyours | last post by:
Hi there all, I have been contracted to write an application that can run on linux or windows, I have heard that Java is platform indepedent but am wondering whether if i use java and my windows os to write the program, will i be able to later run it on linux? With all the GUI intact?
4
1707
by: trouty | last post by:
My company wants me to write an application that generates a password from a five character string that the user enters. This is for security reasons for employees that have to enter the building on the weekends. I remember bits and pieces from school days but can't remember the actual coding, I think you have to reverse the order of the string and subtract 15 from the ASCII code?
0
8207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8150
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8593
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7124
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6098
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5552
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2582
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.