All Tags ›
TPL output target (
RSS)
Sorry, but there are no more tags available to filter with.
-
i solve this problem with something like this in .bat file: Rem *** Example logparser "select * into xxx.html from ... " -i:.. -otpl -tpl:... if not exist xxx.html copy xxx2.html xxx.html rem *** End example where xxx2.html is an static html page with the legend "No Data Found" Enjoy...
-
[QUOTE User="LogParser User : allenbi"]Quote: Well, you could produce a dummy file with all of the possible event numbers in, then report on the dummy file and your main file together. As far as putting the date in the filename, thats easy, use...[/QUOTE] I am trying to get the current system date or...
-
The problem with using DATE and TIME directly is that they aren't truly environment variables. they are special variables that are handled by the command interpreter (cmd.exe) directly. So when LP requests them from the environment, they don't exist.
-
I added "set DateTime=%DATE% %TIME%" to the batch file that kicks everything off and used the %DateTime% variable in my .TPL file and it worked ! Thanks heaps guys It's just strange that I couldn't use %DATE% and %TIME% in my .TPL file. BTW: running Logparser 2.2.10 on Windows 2000 Server SP4
-
Using %DateTime% in your template should certainly work. Is there any chance you aren't using the latest version of Log Parser (2.2.10)?
-
Yes, am running from a batch file - this is it: logparser.exe file:Tat.sql -o:TPL -tpl:EventMonitor.tpl -direction:BW sql file like this: Select ComputerName, EventLog, EventTypeName AS EventType, EventID, EventCategory AS Category, Sourcename, Message, TimeGenerated INTO c:\web\*.html FROM \\server1...
-
Unfortunately, %DATE% and %TIME% aren't actually environment variables, so Logparser can't pick them up. Also, it appears that Log Parser does use UTC time for the %SYSTEM_TIMESTAMP% and there doesn't seem to be a TO_LOCAL() call that would work in the LPHEADER field. Best bet would be to make the batch...
-
No, it probably just doesn't pick up those variables since they are special. Are you running LP from a batch file?
-
Thanks for that. I have tried my own variables in the past but the output HTML page showed the variable name and not it's contents. The %DATE% and %TIME% system variables did the same - the output is "Generated 0n %DATE% at %TIME%" which was generated from this part of my .TPL file <CENTER> <div...
-
Oops. Been a while since someone told me to go read the help file. Yeah, I can see where SYSTEM_TIMESTAMP is in UTC format. So you tried DATE and TIME and they didn't work? They are built in environment variables which the TPL format should support..