No more logs after SVN?


#1

Hello,

Yesterday I “subversioned” my app using svn and now everything works
fine except I don’t see any log entries in development.log?
What would cause the log entries to be not produced anymore?

Thanks
Frank


#2

Hi Frank ~

I am not sure what you mean by “subversioned”, but is your app running
in
development mode? If so the development log should be created unless
there
is a permission issue on where it is trying to write the log. I
personally
do not commit my logs to my svn repository. I only have the log
directory
in the repository, so when I move the app, the DIR is there…

~ Ben


#3

On Feb 2, 2006, at 18:46, softwareengineer 99 wrote:

Hello,

Yesterday I “subversioned” my app using svn and now everything
works fine except I don’t see any log entries in development.log?
What would cause the log entries to be not produced anymore?

If there are several developers in that application logs are not
under version control normally, they are local. Not that this
explains why they are not being written.


#4

Hello Xavier,
Thanks for your reply.
I am the only developer working.

Thanks
Frank

Xavier N. removed_email_address@domain.invalid wrote: On Feb 2, 2006, at 18:46,
softwareengineer 99 wrote:

Hello,

Yesterday I “subversioned” my app using svn and now everything
works fine except I don’t see any log entries in development.log?
What would cause the log entries to be not produced anymore?

If there are several developers in that application logs are not
under version control normally, they are local. Not that this
explains why they are not being written.


#5

Hi Ben,
Thanks for your reply.
Yes, my app is running in development mode.

By “subversioned” I mean I moved the app to a SVN repository. Before
the move the logs were being written to logs/development.log. Now
nothing is being written as I move from page to page.

I don’t want to commit my logs to the repository but would like to
have access to them as I develop.

How can I change where the logs are being written?

Thanks
Frank

Ben R. removed_email_address@domain.invalid wrote: Hi Frank ~

I am not sure what you mean by “subversioned”, but is your app running
in development mode? If so the development log should be created
unless there is a permission issue on where it is trying to write the
log. I personally do not commit my logs to my svn repository. I only
have the log directory in the repository, so when I move the app, the
DIR is there…

~ Ben

On 2/2/06, softwareengineer 99 removed_email_address@domain.invalid wrote:
Hello,

Yesterday I “subversioned” my app using svn and now everything works
fine except I don’t see any log entries in development.log?
What would cause the log entries to be not produced anymore?

Thanks
Frank


Bring words and photos together (easily) with
PhotoMail - it’s free and works with Yahoo! Mail.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


Ben R.
http://www.benr75.com _______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


#6

On 02/02/06, softwareengineer 99 removed_email_address@domain.invalid wrote:

By “subversioned” I mean I moved the app to a SVN repository. Before the
move the logs were being written to logs/development.log. Now nothing is
being written as I move from page to page.

I don’t want to commit my logs to the repository but would like to have
access to them as I develop.

How can I change where the logs are being written?

You may safely leave logs where they are, just tell svn to ignore
them: from your application main directory do:

svn propset svn:ignore “*.log” log

svn ci -m “Ignoring log files” log

Now for the problem with empty log files. I have had the same problem
today and I fixed it just by deleting all contents of log directory.
On next run of ./script/server everything was ok.


#7

Thanks for your reply.

I followed the steps you mentioned and the logs work when using
script/server however no log entries are made when using Apache.

Any suggestions on how I can see the logs when accessing the
application through Apache?

Thanks
Frank

�ukasz Piestrzeniewicz removed_email_address@domain.invalid wrote: On 02/02/06,
softwareengineer 99 wrote:

By “subversioned” I mean I moved the app to a SVN repository. Before the
move the logs were being written to logs/development.log. Now nothing is
being written as I move from page to page.

I don’t want to commit my logs to the repository but would like to have
access to them as I develop.

How can I change where the logs are being written?

You may safely leave logs where they are, just tell svn to ignore
them: from your application main directory do:

svn propset svn:ignore “*.log” log

svn ci -m “Ignoring log files” log

Now for the problem with empty log files. I have had the same problem
today and I fixed it just by deleting all contents of log directory.
On next run of ./script/server everything was ok.


�ukasz Piestrzeniewicz


#8

Hi Zach,
Thank you for your reply.

Yes the user under which apache runs does have permisisons to the log
directory.

I have tried to see the httpd error logs but nothing shows up there
either.

I cannot make sense as to why the logs won’t show up when running
under Apache.

Thanks
Frank

Zach W. removed_email_address@domain.invalid wrote: Does the user apache runs as have
permissions to write to the log directory?

On 2/4/06, softwareengineer 99 wrote:

£ukasz Piestrzeniewicz


#9

Does the user apache runs as have permissions to write to the log
directory?


#10

I tried the following but now I keep getting error when trying to commit
that log is not a working copy. Please advise

svn commit

svn: ‘/var/www/html/hosts/adoppt.com/docs/ror/log’ is not a working

copy

Thanks
Frank

�ukasz Piestrzeniewicz removed_email_address@domain.invalid wrote:You may safely
leave logs where they are, just tell svn to ignore
them: from your application main directory do:

svn propset svn:ignore “*.log” log

svn ci -m “Ignoring log files” log


#11

Hi,

On 06/02/06, softwareengineer 99 removed_email_address@domain.invalid wrote:

I tried the following but now I keep getting error when trying to commit
that log is not a working copy. Please advise

svn commit

svn: ‘/var/www/html/hosts/adoppt.com/docs/ror/log’ is

not a working copy

It seems that log directory was not added to subversion in the first
place. In that case you have to add it first:

$ svn add -N log

Switch -N ensures that add operation is not recursive.
Now you can set the svn:ignore property:

$ svn propset svn:ignore “*.log” log
$ svn ci -m “Ignoring log files” log

It should work.


#12

On 07/02/06, Harm removed_email_address@domain.invalid wrote:

I do have the same problem. And tried the solution stated here but that
did not work. Is there a solution? This is really silly.

Are you using development environment or other? Try setting RAILS_ENV
environment variable to name of environment you are using:

$ RAILS_ENV=development ./script/server


#13

I do have the same problem. And tried the solution stated here but that
did not work. Is there a solution? This is really silly.

Łukasz Piestrzeniewicz wrote:

Hi,

On 06/02/06, softwareengineer 99 removed_email_address@domain.invalid wrote:

I tried the following but now I keep getting error when trying to commit
that log is not a working copy. Please advise

svn commit

svn: ‘/var/www/html/hosts/adoppt.com/docs/ror/log’ is

not a working copy

It seems that log directory was not added to subversion in the first
place. In that case you have to add it first:

$ svn add -N log

Switch -N ensures that add operation is not recursive.
Now you can set the svn:ignore property:

$ svn propset svn:ignore “*.log” log
$ svn ci -m “Ignoring log files” log

It should work.


#14

Well the environment is just development. Nothing changed there. And the
funny thing is that Webbrick neatly logs everything. Only Apache does
not. And all the permissions are correct. The webserver can write in the
relevant directory.
Puzzlement reigns.

Łukasz Piestrzeniewicz wrote:

On 07/02/06, Harm removed_email_address@domain.invalid wrote:

I do have the same problem. And tried the solution stated here but that
did not work. Is there a solution? This is really silly.

Are you using development environment or other? Try setting RAILS_ENV
environment variable to name of environment you are using:

$ RAILS_ENV=development ./script/server


#15

Well I think I figured it out. After the directive FastCgiServer in my
apache conf files I put -initial-env RAILS_ENV=development. Then I
removed the stale development.log file and restarted apache. This
created a new log file! NOTE: if you remove the log file and do not
restart apache, no new log file will appear.
Rejoice!

Guest wrote:

Well the environment is just development. Nothing changed there. And the
funny thing is that Webbrick neatly logs everything. Only Apache does
not. And all the permissions are correct. The webserver can write in the
relevant directory.
Puzzlement reigns.

Łukasz Piestrzeniewicz wrote:

On 07/02/06, Harm removed_email_address@domain.invalid wrote:

I do have the same problem. And tried the solution stated here but that
did not work. Is there a solution? This is really silly.

Are you using development environment or other? Try setting RAILS_ENV
environment variable to name of environment you are using:

$ RAILS_ENV=development ./script/server


#16

Exact situtation here with no solution.

Frank

Guest removed_email_address@domain.invalid wrote: Well the environment is just
development. Nothing changed there. And the
funny thing is that Webbrick neatly logs everything. Only Apache does
not. And all the permissions are correct. The webserver can write in the
relevant directory.
Puzzlement reigns.


#17

All I have in my apache conf files is:

AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi

and if I try to put
-initial-env RAILS_ENV=development

I get an error
“Invalid command ‘-initial-env’, perhaps mis-spelled or defined by a
module not included in the server configuration”

I am using Apache 2, if that helps?

Thanks
Frank

Harm removed_email_address@domain.invalid wrote: Well I think I figured it out. After
the directive FastCgiServer in my
apache conf files I put -initial-env RAILS_ENV=development. Then I
removed the stale development.log file and restarted apache. This
created a new log file! NOTE: if you remove the log file and do not
restart apache, no new log file will appear.
Rejoice!

Guest wrote:

Are you using development environment or other? Try setting RAILS_ENV
environment variable to name of environment you are using:

$ RAILS_ENV=development ./script/server


Posted via http://www.ruby-forum.com/.


#18

Hi �ukasz,

Thank you very much for your tips/assistance.

I tried the following and restarted Apache and it works!

ENV[‘RAILS_ENV’] ||= ‘development’

Thanks
Frank

Guest removed_email_address@domain.invalid wrote: Well the environment is just
development. Nothing changed there. And the
funny thing is that Webbrick neatly logs everything. Only Apache does
not. And all the permissions are correct. The webserver can write in the
relevant directory.
Puzzlement reigns.

�ukasz Piestrzeniewicz wrote:

On 07/02/06, Harm wrote:

I do have the same problem. And tried the solution stated here but that
did not work. Is there a solution? This is really silly.

Are you using development environment or other? Try setting RAILS_ENV
environment variable to name of environment you are using:

$ RAILS_ENV=development ./script/server


Posted via http://www.ruby-forum.com/.


#19

I put it in config/environment.rb

Thanks
Frank

harm removed_email_address@domain.invalid wrote: Just out of curiousity, where did you
put
ENV[‘RAILS_ENV’] ||= ‘development’ ?


#20

Just out of curiousity, where did you put
ENV[‘RAILS_ENV’] ||= ‘development’ ?

softwareengineer 99 wrote:

Hi �ukasz,

Thank you very much for your tips/assistance.

I tried the following and restarted Apache and it works!

ENV[‘RAILS_ENV’] ||= ‘development’

Thanks
Frank