I'm at a loss here. I've created a model named log.py, which contains:
I copied logging.example.conf to my web2py folder and renamed it to logging.conf and added myapp to the end of keys, then added the following code for the handler:
In default.py I've added a couple of logging statements similar to thie:
When I run this locally, I see a file created at ./web2py/logs/web2py.log. However, when I deploy this same code to my server, I get nothing. I went so far as to create that file manually and chmod 777 the file to see if I had some silly permissions issue, and I see nothing. I'm running web2py's built in server via a cronjob like this:
The reason I'm adding the logging is because I was trying to run a subprocess in order to ping a certain set of URL's to check their status upon a page load, using nping, and was having the same problem with that (subprocess runs fine on local machine, but is not running correctly on server). Ideas and suggestions would be appreciated. Thanks! Of note, all references to "myapp" above are actually named for the correct application name, not just the text "myapp". asked 15 Sep '15, 18:24 mikecole79 seanf |
The question has been closed for the following reason "The question is answered, right answer was accepted" by seanf 16 Sep '15, 16:32
Aight, so here's the situation. I'm dumb, ran across a forum with a bunch of good questions on it, and posted a question. I'm not using a webfaction server and didn't even realize that it was a hosting service itself, or anything more than a useful forum. Thus, I'm running on a private server, behind a corporate firewall, and not on one of your servers. So this was my mistake. Just trying to find some answers, and I wasn't getting any responses on StackOverflow. Sorry for the mistake. Unsure how to close this question. answered 16 Sep '15, 16:25 mikecole79 No sweat, I've closed the topic.
(16 Sep '15, 16:32)
seanf
|
Regarding "I'm running web2py's built in server via a cronjob like this" - I'm assuming that's how you're running it locally. How are you running it on the server?
That's actually what's running on the server. I did some reading and I recall there being some security concerns over using the built in server, but it's an internal corporate server (and a dinky little underpowered thing at that) which is behind a big scary company firewall, so my security concerns are extremely limited for that server, and it seemed far easier to do that than fiddle with trying to get Apache up and configured to do what I wanted it to do.
Locally I just start the server through my IDE when I need it running to validate something then stop it when I'm done working with it.
Ok, there are a couple of problems with that:
I don't know if any of that will help your logging problem, but it's worth a shot. Feel free to open a support ticket if you'd like us to take a closer look at what you've got going on the server.