For Madshi or anyone that can help.

Posted on 2002-04-20
Last Modified: 2010-04-04
Madshi, there is one other problem I have using the code you gave me. How can I make it so that the log it creates looks like this:

Application Log - Generated on April 14, 2002
Program started.

The first time the log is created, it writes the Application Log... and the -------------. Afterwards,
it starts logging stuff.

Please help! I tried doing it but failed miserably. More points if needed. Thanks!
Question by:DelFreak
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 20

Expert Comment

ID: 6957772
Simply put the following 3 lines into the beginning of your project file (*.dpr):

program yourProgram;

uses [...];

  Log('Application Log - Generated on ' + DateTimeToStr(Now));
  Log('Program started.');

Regards, Madshi.

Author Comment

ID: 6959365
Well, that's what I'm currently using now. What I want is for the function to write the date the log was created and then start logging from there. No other date. Thanks!
LVL 20

Accepted Solution

Madshi earned 20 total points
ID: 6964998
I'm not sure if I understand you right. Maybe you mean this?

var firstLog : boolean = true;
procedure log(...);
  if firstLog then begin
    firstLog := false;
    Log('Application Log - Generated on ' + DateTimeToStr(Now));
    Log('Program started.');
  [...] // hier comes the original log source code

Regards, Madshi.

Author Comment

ID: 6965468
Cool! Let me try it. Thanks!

Author Comment

ID: 7171089
Thank you! Your code worked great!

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to center only a line in richedit? 4 69
JAudiorecorder record freezing the app 29 83
enhance the following code 3 42
Microsoft Access 97 and Delphi XE2 9 72
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question