NetTalk Central

Author Topic: PR29 Addlog  (Read 11173 times)

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
PR29 Addlog
« on: August 30, 2010, 10:38:21 AM »
If I set logging on the server window to screen & file
and then I use p_web.addlog('Some really important message')
shouldn't it go to the screen AND the file?
I find that it goes to the screen, but not the file. :(
Let me know if I'm doing somethingelse wrong.

chris
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: PR29 Addlog
« Reply #1 on: August 31, 2010, 02:17:15 AM »
Hi Chris,

I tried what you did here, and the 'really important message' appeared in the log, on the screen, and on the disk.

So perhaps it si in the file, but you were looking at the wrong file?
Or perhaps it came though before the logging to disk started?

cheers
Bruce

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: PR29 Addlog
« Reply #2 on: August 31, 2010, 02:18:15 AM »
BTW - I'll leave my example in, in example 30, Hyperlinks, in the next build.
I've added a log to the "browseCustomers" procedure.

Cheers
Bruce

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: PR29 Addlog
« Reply #3 on: August 31, 2010, 08:12:28 AM »
In my instance, it creates a new log file with just my text-

I am testing for when a value is or isn't there so in the PreInsert I put this code -

p_web.AddLog('V:UpdateCus_CusId='&p_web.getvalue('UpdateCus_CusId'))
p_web.AddLog('SV:UpdateCus_CusId='&p_web.gsv('UpdateCus_CusId'))


which produces a new logfile with this data -

<item> 8/31/10,12:06:32,</item>
<request>,V:UpdateCus_CusId=2</request>
<item> 8/31/10,12:06:33,</item>
<request>,SV:UpdateCus_CusId=2</request>


I thought it would be added to the logfile in line.

chris
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: PR29 Addlog
« Reply #4 on: August 31, 2010, 09:55:34 PM »
Hi Chris,

first, on the debugging front, I recommend the use of DebugView (www.sysinternals.com). NetTalk has built in support for it, in the web server via the p_web._trace(something) method.

On the log front I'm not sure I really understand your problem.
You called AddLog, and it seems to me the item got added to the log.
So obviously I'm missing something here...
I'm not sure that it still matters to you, but if you like, perhaps explain what part of the code below is wrong?

cheers
Bruce

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: PR29 Addlog
« Reply #5 on: September 01, 2010, 04:18:00 AM »
Yes, debugview is better than the log for debuggind, but I was looking for where/when in the process that data changed. So having it in the log file seemed to be ideal. I could see the web packets and see the data. The problem is that the addlog statements go into a different log file than the packet information. It doesn't start a new logfile and continue there it just puts them somewhere else.
It isn't bad, just odd. And for what I was looking for not very helpful.
What I think I will do is drop a ds_debug line in the addlog method and then use ds_debug for the testing. That way I can see the traffic and messages together.

Thanks,
Chris
Real programmers use copy con newapp.exe

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: PR29 Addlog
« Reply #6 on: September 01, 2010, 08:12:22 AM »
You can use TraceIt !!!
http://www.armi.com.ar/TraceItEN.html
Regards
Alberto
-----------
Regards
Alberto

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: PR29 Addlog
« Reply #7 on: September 01, 2010, 08:36:57 AM »
Alberto, Looks like a pretty nice tool!
I will think about it.
Thanks,
chris
Real programmers use copy con newapp.exe