7 Replies Latest reply on Feb 19, 2013 11:11 AM by Jon Tara

    rholog.txt stops logging

    Jon Tara

      I have a problem since moving to a new development machine (Mac Mini/Mountain Lion, coming from 2008 Macbook/Lion). I'm building for iOS simulator.

       

      The log stops after a bit. I have to do some logging at MinSeverity 0, and it produces a lot of log output. I disabled a couple of annoying entries

      ("we still have active transfers..." and "rho_ssl_send") but unfortunately, the log still stops before it gets to what I need to see.

       

      I notice that there is a file called rholog.txt_pos, and  it says 89506. (Logfile size is 612362). When the log is working correctly, this file is always empty.

       

      Anybody else experience this and have a fix?

        • Re: rholog.txt stops logging
          Jon Tara

          Workaround. Use the poorly-documented rhologurl rhoconnect.txt setting.

           

          Rhodes keeps logging to the URL, even though the standard rholog.txt freezes.

           

          # Simple Rhodes log server in Sinatra

          # Use rhologurl = "http://server_name:7777"

          # Recommend you use thin server, not webrick - gem install thin

          # Sinatra will use thin automatically if available

          #

          # Run like:

          #

          # ruby logserver.rb | tee rholog.txt

           

          require 'sinatra'

           

          # It's silly to log, since we are a logger, and we'd like to write to STDOUT

          set :logging, false

          set :port, 7777

           

          post '/' do

            request.body.rewind

            puts request.body.read

          end

          • Re: rholog.txt stops logging
            Gerbrand Stap

            I've experienced the same problem, when changing the MaxLogFileSize setting.

            It could be that the logging brakes when MaxLogFileSize = 0 (unlimited) and there is a value in rholog.txt_pos. Or when the value in rholog.txt_pos is bigger than the size of rholog.txt or the MaxLogFileSize.

            I don't know exacly what causes it, but removing rholog.txt_pos and removing or emptying rholog.txt fixes the problem for me no matter what the setting is. Removing rholog.txt is not always possible, because it's always in use when RhoStudio is running, and sometimes when RhoStudio is closed too.

            1 of 1 people found this helpful
              • Re: rholog.txt stops logging
                Jon Tara

                Unfortunately, deleting these files doesn't seem to help, at least in my situation. It just recurs when you re-start the app. And if you delete them while the app is running, then it stops logging.

                 

                It is acting as if I had set MaxLogFileSize to some non-zero number. What's more, it seems to be set to an arbitrary number. The size at which the log stops is different each time.

                 

                rholog.txt_pos appears to be what keeps track of the write position when the log file has a limit set. I see that although the size of rholog.txt freezes, the number in rholog.txt_pos does constantly change and wrap. The file dates both keep updating, and the number in rholog.txt_pos changes, so I assume it is wrapping the log, even though I gave a MaxLogFileSize of 0.

                 

                It seems that logging is just plain broken, at least in Rhodes 3.5.1.3

                  • Re: rholog.txt stops logging
                    Jon Tara

                    I should add that I only observed this when I moved to a much faster development machine (about 3X the speed of my previous one). I wonder if there's some race condition in the logging code?

                     

                    Also, this machine has a very fast flash drive - 300mbyte/sec write, 500mbyte/sec read. (Mac Mini with Fusion Drive). Probably would be best for the drive to put the log on a ramdisk, but if the problem is as I suspect it will just make the problem worse. (While saving my flash drive.)

                     

                    I'm just going to find the code that does the logging and patch it so that it can't wrap.