[NTLK] NPDS 2.1x Question

Grant Hutchinson grant at splorp.com
Thu Feb 25 10:53:03 EST 2016


On 2016-02-24, at 5:32 PM, Sylvain Pilet wrote:

> On nHTTPd 2.1x
> I saw that there are two functions:
> LogToTextfile
> LogToWorks
> 
> My question, I do not understand how to access these features from NPDS.
> Can anyone explain?

Those functions are accessible via NewtonScript and allow you to export the nHTTPd server log data. Here is some information from Paul Guyot lifted from as old NPDS Mailing List thread:


>> Can somebody confirm for me that logging works in 2.101?  I cannot get
>> it to work:  I get an Internal Server Error.  The /cfg page loads fine,
>> but when it goes to produce the log it fails.
> 
> Well, sort of. Logging _is_ working in 2.101, but log viewing is
> temporarily busted.

Actually, it could kill the server in 2.1 if the log was too big.

> In the meantime, you can export the log file to either Notepad or
> NewtWorks using one of the following NewtonScript calls - :LogToTextFile
> or :LogToWorks

LogToTextFile doesn't export to the notepad but exports to text.

You have two options (to put in a DashBord or NPDS script)

GetRoot().paperroll:MakeTextNote(GetRoot().|nHTTPd:ALLPEN|:LogToTextFile(nil), true);

GetRoot().|nHTTPd:ALLPEN|:LogToWorks(nil);


Grant

----------------------------------------------------------------------

Grant Hutchinson
NewtonTalk List Dad & Web Custodian





More information about the NewtonTalk mailing list