Ankündigung

Einklappen
Keine Ankündigung bisher.

Question for started in -debug mode?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Question for started in -debug mode?

    Hello... I'm seeing a strange issue on my sh.py, if I create some logics and rum the sh.py -d to monitor the logics, which works perfectly, but if I then disconnect from the putty session while the sh.py still is in debug mode, the logics doesn't work correct... I've had a PC connected with putty for the last 3 days, where all worked fine (to log what happened) tonight when the PC has rebooted by itself, the logics failed...

    Is my intuition here correct that something happens?

    #2
    If you disconnect SH.py would be killed if you run it with -d.
    You could use -v to generate a debug log and go into daemon mode.

    so long

    Marcus

    Kommentar


      #3
      Zitat von mknx Beitrag anzeigen
      If you disconnect SH.py would be killed if you run it with -d.
      You could use -v to generate a debug log and go into daemon mode.

      so long

      Marcus
      Thanks - where's the debug log placed default?

      Kommentar


        #4
        It´s in /dir-of-smarthome/var/log/smarthome

        +1 for smarthome in daemon

        Kommentar


          #5
          I've tryed that, and it does also logs very fine... But in my scripts i'm making some print() statements, to easier debug where the fault is -theese messages doesn't get logged? they are showed when running in -d mode - is it possible to enable logging of theese also?

          Kommentar


            #6
            Zitat von Rasmus7700 Beitrag anzeigen
            I've tryed that, and it does also logs very fine... But in my scripts i'm making some print() statements, to easier debug where the fault is -theese messages doesn't get logged? they are showed when running in -d mode - is it possible to enable logging of theese also?
            Zitat von Rasmus7700 Beitrag anzeigen
            I've tryed that, and it does also logs very fine... But in my scripts i'm making some print() statements, to easier debug where the fault is -theese messages doesn't get logged? they are showed when running in -d mode - is it possible to enable logging of theese also?
            You can't use print() to show your debug the print statement is only visible in interactive mode.
            To make what you want, you should use : logger.info() instead of print(): Logics ? SmartHome.py 1.0 documentation

            Kommentar

            Lädt...
            X