Hi,
What would be the best approach to log different items (SQL, Exceptions,
Security, ...)
I have a simple Logging function that adds log string to the end of a text
file.
Is there any application block for that? Should i do the logging into SQL
server table ?
Any help would be apprecited,
Ali 8 1687
I've always preferred using a DB, like MS SQL, to log to. It allows for
easier retrieval later and better reporting.
--
Curt Christianson
Owner/Lead Developer, DF-Software www.Darkfalz.com
"A.M" <IH*******@sapm 123.com> wrote in message
news:O%******** ********@tk2msf tngp13.phx.gbl. .. Hi,
What would be the best approach to log different items (SQL, Exceptions, Security, ...) I have a simple Logging function that adds log string to the end of a text file. Is there any application block for that? Should i do the logging into SQL server table ?
Any help would be apprecited, Ali
Isn't it a heavy load on DB server?
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:ut******** ******@TK2MSFTN GP11.phx.gbl... I've always preferred using a DB, like MS SQL, to log to. It allows for easier retrieval later and better reporting.
-- Curt Christianson Owner/Lead Developer, DF-Software www.Darkfalz.com
"A.M" <IH*******@sapm 123.com> wrote in message news:O%******** ********@tk2msf tngp13.phx.gbl. .. Hi,
What would be the best approach to log different items (SQL, Exceptions, Security, ...) I have a simple Logging function that adds log string to the end of a
text file. Is there any application block for that? Should i do the logging into
SQL server table ?
Any help would be apprecited, Ali
Curt_C [MVP] wrote: I've always preferred using a DB, like MS SQL, to log to. It allows for easier retrieval later and better reporting.
How do you log a failed login into the database?
--
gabriel
not really, I mean it's better then opening files as the file system level
that's for sure....
--
Curt Christianson
Owner/Lead Developer, DF-Software www.Darkfalz.com
"A.M" <IH*******@sapm 123.com> wrote in message
news:eo******** ******@TK2MSFTN GP11.phx.gbl... Isn't it a heavy load on DB server?
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message news:ut******** ******@TK2MSFTN GP11.phx.gbl... I've always preferred using a DB, like MS SQL, to log to. It allows for easier retrieval later and better reporting.
-- Curt Christianson Owner/Lead Developer, DF-Software www.Darkfalz.com
"A.M" <IH*******@sapm 123.com> wrote in message news:O%******** ********@tk2msf tngp13.phx.gbl. .. Hi,
What would be the best approach to log different items (SQL,
Exceptions, Security, ...) I have a simple Logging function that adds log string to the end of a text file. Is there any application block for that? Should i do the logging into SQL server table ?
Any help would be apprecited, Ali
I have a seperate user that runs all "non-user specific" items, like
logging.
--
Curt Christianson
Owner/Lead Developer, DF-Software www.Darkfalz.com
"gabriel" <no@no--spam.com> wrote in message
news:1e******** *************** ****@msgid.mega newsservers.com ... Curt_C [MVP] wrote:
I've always preferred using a DB, like MS SQL, to log to. It allows for easier retrieval later and better reporting.
How do you log a failed login into the database?
-- gabriel
I use sqlserver, and a background thread to do the logging, this way logging
does not hold up processing. if the logging thread cannot write to
sqlserver, it logs to the event log.
-- bruce (sqlwork.com)
"A.M" <IH*******@sapm 123.com> wrote in message
news:O#******** ******@tk2msftn gp13.phx.gbl... Hi,
What would be the best approach to log different items (SQL, Exceptions, Security, ...) I have a simple Logging function that adds log string to the end of a text file. Is there any application block for that? Should i do the logging into SQL server table ?
Any help would be apprecited, Ali
There are many places you can log your errors. My prefrence is to use the windows event logs
You can also have your own text file logging. It can be plain text or an XML file
As Curt mentioned SQL is also another alternative and it is also the easiest to report from if you have a need for that kind of stuff
Each of the above methods has their ups and downs
Logging to the event logs>> Web users have to given rights to write to this log and sys admins sometimes wont like this
Logging to your own text file>> Slower than logging to SQL or Event logs. You have manage the file on your own(i.e. how much can it grow, etc
Logging to SQL server>> Logging credentials might fail
It's up to you to figure out what best fits your application and design the best solution
BTW when you are logging errors to the database it would be better to use different credentials to write to the SQL tables other than the credentials used to access your transactional system. Even that's not fail proof so you have to handle a scenario where the credentials fail
A good place to start might be to look at Microsoft's exception management block http://msdn.microsoft.com/library/de...tml/emab-rm.as
HTH
Suresh
----- gabriel wrote: ----
Curt_C [MVP] wrote I've always preferred using a DB, like MS SQL, to log to. It allows fo easier retrieval later and better reporting
How do you log a failed login into the database
--
gabrie
Hi Ali,
Thanks for posting here. As for the datasource to store logging info, I
think Curt and bruce's suggestions are quite considerable. In addition, I'm
not sure whether you've used the "Log4Net" component, it is a tool to help
the programmer output log statements to a variety of output targets.
log4net is a port of the excellent log4j framework to the .NET runtime. Its
multi-Adaptors have provide the support to many targets such as database
server, xml log files and event log.. etc. You'may get its info via the
following web link:
#log4net - Features http://log4net.sourceforge.net/relea.../features.html
Hope this also helps.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jjesso |
last post by:
I am trying to add a new logging level.
logging.config.fileConfig("bengineLog.cfg")
logging.CLIENT = logging.INFO + 1
logging.addLevelName( logging.CLIENT, 'CLIENT' )
logging.root.setLevel( )
logger = logging.getLogger(None)
logging.Logger.client('test')
I get error:
|
by: Karuppasamy |
last post by:
H
I am trying to use the Logging Module provided by Microsoft Application Blocks for .Net
I installed everything as per the Instructions given in the 'Development Using the Logging Block'
But when i am trying to run the sample, i am getting the following error in the Event Viwer
Kindly help me on this
|
by: pmatos |
last post by:
Hi all,
I am trying to create a simple but efficient C++ logging class. I know
there are lots of them out there but I want something simple and
efficient. The number one requirement is the possibility of shutting
logging down at compile time and suffer no performance penalty
whatsoever for getting logging on whenever I wish. Of course that I
would need to recompile the project each time I want to turn logging on
or off. But given a...
|
by: Rotem |
last post by:
Hi,
while working on something in my current project I have made several
improvements to the logging package in Python, two of them are worth
mentioning:
1. addition of a logging record field %(function)s, which results in
the name
of the entity which logged the record. My version even deduces the
class name in the case which the logger is a bound method, and assuming
the name of the "self" variable is indeed "self".
|
by: Burkhard Schultheis |
last post by:
As I wrote last week, we have a problem with a DB2 V8 on Linux. Here is
what is in db2diag.log during online backup:
Starting a full database backup.
2004-04-01-02.33.54.760164 Instance:lzgneu Node:000
PID:1293(db2loggw (TELEMATX)) TID:1024 Appid:none
data protection sqlpgwlp Probe:909
TailPage 0 does not match pagelsn 0023CEBF0FFB and firstlsn 0023CEBF8000
| |
by: robert |
last post by:
As more and more python packages are starting to use the bloomy
(Java-ish) 'logging' module in a mood of responsibility and as I am not
overly happy with the current "thickener" style of usage, I want to put
this comment and a alternative most simple default framework for
discussion.
Maybe there are more Python users which like to see that imported
(managed) logging issue more down-to-earth and flexible ? ...
Vinay Sajip wrote:
>...
|
by: rajesh.hanchate |
last post by:
Please help me in resolving this issue.
I am using EnterpriseLibrary 2.0 Exception and logging block for
logging exceptions to event log. It works fine for sometime. After some
time it stops logging to event log. To make it active again I need to
open the web.config and save without making any changes. It starts to
work again.
Here is the configuration I am using.
<exceptionHandling>
|
by: Chris Shenton |
last post by:
I am setting up handlers to log DEBUG and above to a rotating file and
ERROR and above to console. But if any of my code calls a logger
(e.g., logging.error("foo")) before I setup my handlers, the logging
system will create a default logger that *also* emits logs, which I
can't seem to get rid of. Is there a way I can suppress the creation
of this default logger, or remove it when I 'm setting up my handlers?
Thanks.
Sample code:
|
by: Lowell Alleman |
last post by:
Here is the situation: I wrote my own log handler class (derived from
logging.Handler) and I want to be able to use it from a logging config
file, that is, a config file loaded with the
logging.config.fileConfig() function.
Let say my logging class is called "MyLogHandler" and it's in a module
called "mylogmodule", I want to be able to make an entry something
like this in my logging config file:
|
by: samwyse |
last post by:
In the Python 2.5 Library Reference, section 14.5.3 (Logging to
multiple destinations), an example is given of logging to both a file
and the console. This is done by using logging.basicConfig() to
configure a log file, and then calling
logging.getLogger('').addHandler(console) to add the console.
However, in section 14.5.4 (Sending and receiving logging events
across a network), a call is made to
rootLogger.addHandler(socketHandler),...
|
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,...
| |
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...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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: 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...
| |