Mochiweb Log files - erlang

Anyone know where Mochiweb logs files by default? I'm running it along with the Beepbeep framework.

Mochiweb reports errors via the error_logger, so you can either write your own handler, or start SASL, and configure it to write a log file.

Aren't they kept in the priv directory next to mochiweb's start script?
Edit: Never mind, I'm wrong.

Mochiweb does not create log files as you would think it would. If you want to have apache-like logs, you'll have to roll your own.

Related

How do I add logs to MongooseIM logs?

I am trying to modify some APIs in MongooseIM and I want to see some logs. I tried adding lager-logging using MongooseIM, but the APIs stopped working after that.
If you have source code, you can add debug statement into it and compile it to beam file then replace the old file. The debug statement is to write some log into log file. I have used this method solving the problem in rabbitmq before.

Log org.springframework

I have a non-Spring appliation. However, we are pulling in spring-security-config and spring-security-web. We use Log4j and have a log4j.properties file.
We want to log all the output from 'org.springframework' with the 'trace' log level.
We do not have an application.properties file, but can create one if we need one.
So, when I run my non-Spring app, all my code logs properyly, but I am not seeing anything from org.springframework in my logs.
Since Spring Security pulls in Spring Core, we created an application.properties on the classpath. We then setup a logging.file property to our log file. Then we setup some other logging property files to see if that would help. We also set debug=true as well.
So, I'll keep trying ....
Thanks in advance!
So, I found the problem. The logs were going to another log file in a different directory. I believe this is because it was a container log and not an application log.
Hope this helps someone else out.

Extract information from a log file using powershell

Hi I am new to the language of powershell s i though about playing around with it. I am trying to extract information out of a log file (the file belongs to a program called event viewer). I need to use the information under Boot Duration.
Could somebody guide me a little bit?
It will be greatly appreciated
Thanks.
Logs are always the same. Not sure if you are going to monitor boot log of windows or linux or what.. but will try to answer.
If you edit your question and add info on the operating system and an example of relevant lines of boot log file I can provide you with some powershell code.
In general you should do:
Identify how to manually see boot time in log file. For example
probably it will have a starting boot time and a finished boot time.
Something similar to this.
[2012-06-08 12:00:04] starting boot
lot of log entries
[2012-06-08 12:00:34] finished boot
Once you know how to do it manually, you have to convince powershell to do it for you. You can use regular expressions to look for the pattern of dates. In my example look for lines that contains "starting boot" and then parse it to load date.
Here you have an useful link on powershell and regular expressions: http://www.regular-expressions.info/powershell.html

Rabbitmq erlang client build failed due to file paths problems?

I have been able to build rabbitmq server on ubuntu linux. It came already prepackaged and on making, it is able to start as a service. When i got the client source, i failed to make because it appeared like it needed a folder called ./deps/rabbitmq-server. Analysing the code, i find that the author of the client was accessing the same header files as are found in the server, using include_lib("path to rabbit.hrl e.t.c") in his header file called "amqp_client.hrl". I then decided to add rabbitmq_server in the lib dir of erlang so as its paths are automatically added on start up of the vm. But still this didnot help. There is also another folder which the client references called "rabbit_common" for an include folder he assumes would contain all the .hrl files there. Please assist me in building both the client and server on my ubuntu server, for testing.
Also, if anyone has used RabbitMQ server for IMs, please provide some benchmarks and/or your findings on its throughput, speed and number of users. How can it be compared to ejabberd?. How can one create AJAX/Jquery/Javascript clients for Web functionality?
thanks
I hope you had made some progress as far as RabbitMQ and ejabberd are concerned.
Below is a link to an interesting discussion that might be of help.
http://old.nabble.com/AMPQ-vs-XMPP-and-RabbitMQ-vs-ejabberd-td17587109.html

Nant: Process id of a service that is already running

Does anyone know how to get the PID of the process that a windows service is running in from Nant?
I am having file locking problems. I issue a stop command to the service and then try and delete the Windows service's files. However these are quite often locked by the process that the Windows service is running in. I want to find the PID so that I can wait for it to terminate before deleting.
Thanks
You might have to create a custom nant task to do this. However you might want to see about just adding maybe a delay like 1 min or something before you try to replace your files. Might be easier.

Resources