473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Question about logfiles in Python

Hello readers,

my name is Joannis Courtis and I study computer science in
Frankfurt/Germany. I hope you can help me, because I try to find a script
that helps me to filter logfiles which I received from the Microsoft
Exchange Server.
Can you help me, where I can find a script in Python.

Regards Joannis Courtis

--
Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail
Jul 18 '05 #1
1 1426
I'm not familiar with Exchange log files but this can be done rather
easily assuming the log file is a flat text file (which usually these
are not-- like NT event logs).

search_str = "words and phrases"
data = open(LogFile, 'r').read()

if search_str in data:
flag = 1

If they are binary files, you may have to use a special module (or
write one yourself if it doesn't exist). A good place to look is in
Mark Hammond's Win32 modules. You'll find some stuff here:
http://starship.python.net/crew/mhammond/

Hope this sends you in the right direction.

Jul 18 '05 #2

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

Similar topics

3
by: Pjotr Wedersteers | last post by:
Hi, I am rather new to PHP and a relative newbie to Linux too. I have a webserver at home (Apache 2.0.48 on SuSe 9.0, PHP4). I have some scripts, one of them needs to be able to create logfiles...
0
by: richardb | last post by:
--=_alternative 002B892D48256D5E_= Content-Type: text/plain; charset="us-ascii" Is it possible to manually delete the logfiles created in innodb tables and then do a 'touch logfilename' to...
19
by: dchow | last post by:
Our database size is currently 4G and is incrementing at a rate of 45M/day. What is the max size of a SQL database? And what is the size beyond which the server performance will start to go down?
4
by: deprins | last post by:
Hello, I have run into some problems with logfiles and backup logfiles (MS SQL server). I have read much about them but uptil now I dont seem to grasp how it works. Specially the part of working...
1
by: Oliver Spiesshofer | last post by:
Hi, I switched the server my webpage was hosted on and now the logfile format is different. the old one are daily logfiles, in the format mydomain.net.access_log.01Feb2004 now I would...
1
by: malla | last post by:
Hi Any one help me what are actually logfiles why to take backup? why to restore? when to restore? Advance thanks
3
by: Mythran | last post by:
Just a question that I keep forgetting to ask "off-topic" to others in the same field of work or hobby... Yes, I know this isn't a group specific question, but would like to know how y'all setup...
2
by: jabernet | last post by:
We decided to root for a backup strategy using online incremental backups which include the log files (avail since DB v8.2). Now I wondered, if DB2 automtically deletes the archived logfiles after...
0
by: Knokmans | last post by:
My config: - using DB2 v9 linux/intel non-partioned - logarchive is done by userexit - archived logfiles are cleared from disk after x hours - no backups are taken from this database, because we...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
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...

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.