473,789 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamically change the Flat File Sink file name in the MS Logging Application Block

Hi

I have been having a bit of a look at the Microsoft Logging Application
Block (using .NET 1.1). I found it easy to get going, but now have
struck a bit of a brick wall.

I want to dynamically change the flat file location so that on a
pre-defined condition (date changes, file memory size exceeded), a new
file is created and logging continues in that file.

I can see the where the flat file configuration is set in the config
file:
<sink xsi:type="FlatF ileSinkData" name="Flat File Sink"
fileName="trace .log" header="----------------------------------------"
footer="----------------------------------------" />

Are there any calls/methods in this Block that allow the filename value
to be changed at runtime (not in the web.config)?

Grateful for any advice, or happy to provide further explanation ...

Thanks

James

Jun 28 '06 #1
0 2056

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

Similar topics

1
2851
by: Ollie Riches | last post by:
I have written a custom logging sink for the enterprise library logging application block (June 2005). I have been able to configure it as expected from the UI config tool (EntLibConfig.exe). I have built a console application to test it with and I am getting the following error message write to the default trace log when I attempt to use my custom logging sink. 'An error occurred while the Distributor was processing the message. ...
5
2937
by: who be dat? | last post by:
Hello all. I'm writing an application that is writing trace information that can be viewed in trace.axd. I would like to rename this and use a different name specific to my application. I know the name of this is set in machine.config. I was hoping it would be possible to change this in web.config. I got it to work, kind of. Good news is I can change the name in my web.config file. Bad news is that trace.axd still works meaning I can...
2
2225
by: Pieter | last post by:
Hi, I'm using the Settings.settings of VB.NET to define a Connectionstring (Scope = application). When I deploy the Solution, and change this Setting in the app.config-file, it seems that itdoesn't affect the Application at all! It still uses the old value. Are the Settings.Setting hardcoded somewhere in the application? I can't find any documentation of this subject, or anyway how I should do
4
1737
by: marko.suonpera | last post by:
How to create a buffer of memory in C++, whose size can dynamically grow and shrink as needed? This is used for buffering input/output. Several variable types, such as int and double are read and written in this buffer in specific order. Currently I use a fixed size array: char *data = new char; I thought about std::vector<char> but can I directly access the memory in vector in this fashion:
37
8970
by: sam44 | last post by:
Hi, At startup the user log on and chooses the name of a client from a dropdownlist, which then changes dynamically the connection string (the name of the client indicates which database to use). I then change dynamically the connection string by doing : My.Settings.Item("ConnectionString") = "some connection sring" The problem is that if another user loggs in and chooses another client, then obviously it changes the connection string...
1
1446
by: =?Utf-8?B?R3JlZyBTdGVlbGU=?= | last post by:
Does anyone know how to set an email account userID and password for the Enterprise Library Logging code block email sink? I can send email to an SMTP server only when it allows unauthenticated relays. This is OK on an intranet, but I know need to get notifications over the internet of certain types of errors.
2
6934
by: Anup Daware | last post by:
Hi Group, Can somebody tell me where I can find the internals of Logging application block 2.0/3.0. I need answers for the questions like: What best practices have followed in the implementation of logging application block? Is buffered writing is supported by this block? Does it write synchronously or asynchronously to the specified destination?
0
1654
by: =?Utf-8?B?U2hyaWthbnQgTW9yZQ==?= | last post by:
Using enterprise library's 3.1 Logging Application Block , how can i get the custom source name in the windows event log.When ever i am logging an error in windows event log , it gives the source name as Enterprise Library Logging.I want my custom source name instead of Enterprise Library Logging.Also how can i get the username and category also, through Logging Application Block.
3
1500
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, Is there a way to dynamically get the name of the current Sub? In my code below in the exception "catch" i write the name of the Sub to the error log so that i will know where there error happened, but since i reuse this code in other Subs i sometimes forget to change the name of the Sub. is there a way to get it dynamically? Also, is there a way to write out the line number where the error happened so you can pinpoint exactly where...
0
9656
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
9499
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
10374
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
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
8995
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...
0
5404
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5539
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2898
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.