> Hello,
>
> First, I currently cannot contribute anything to the wiki. I cannot connect to
>
> the primary site:
>
> art-blog.no-ip.info: Socket operation timed out
> The server art-blog.no-ip.info refused to allow this computer
> to make a connection.
>
Make sure you have up-to-date DNS, if not flush it, the IP is changed
once in a while to there maybe temporary issues.
>
> When running the application (apache2 / fastcgi / apache started), where is
> std::cerr?
> I have set up the apache error.log but the std::cerr messages do not show
> there, nor anywhere I looked in /var/log/.
I don't know how apache or other web servers handle standard error of the
applications they start, most of them just ignore it so I would not
relay on this.
>
> I have tried to set the log file as described here:
> http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_config#logging.stderr
> {
> "service" : {
> "api" : "fastcgi",
> "socket" : "stdin",
> },
> "logging" : {
> "file" : {
> "name" : "/www/cppcms/logs/cppcms.log",
> "append" : true,
> },
> },
> }
> but the application won't run if I add the "logging" section to config.js.
> Maybe I am missing something.
> More explicit examples would be useful in that section of the wiki.
>
Logging is done using BOOSTER_ERROR like family of macros:
See: http://art-blog.no-ip.info/cppcms_ref_v0_99/log_8h-source.html
Basically you do
BOOSTER_WARNING("myapp") << "Failed to do something for " << foo;
This allows you to filter messages by warning levels and specific
application parts that should be traced.
See: cppcms::log namespace for details (in Doxygen reference)
>
> So, if I add code like this in my cppcms application:
> std::cerr << message << std::endl;
> Where can I find such messages?
>
Likely nowhere as most web servers ignore standard error of the application
and redirect it to /dev/null
Artyom
|