Another log by tracing question 
Author Message
 Another log by tracing question

One of my processes dies abnormally and the associated spawn_id is not
longer connected. I detect this with expect eof as illustrated below:

proc logByTracing {array element op} {
  uplevel {
    global logfile

    if { [info exists logfile($expect_out(spawn_id))] } {
       set file $logfile($expect_out(spawn_id))
       log2File $file $expect_out(buffer) 0
       flush $file
    }
  }

Quote:
}

Comment: log2File is a simple proc to log data to a given file handle.

logByTracing

set spid1 [ connect2Host $hostname]

expect {
    -i $spid1 eof {
        #reconnect to the host
        puts "disconnect from $hostname. Reconnecting."
        set spid1 [connect2Host $hostname]
    }

    :
    :

Quote:
}

My question is this. After detecting eof as shown above, and respawning the
process, do I have to call logByTracing again? Or is it not needed to be
called again?

Thanks,
JS



Wed, 15 Feb 2006 19:12:15 GMT  
 Another log by tracing question

Quote:

> One of my processes dies abnormally and the associated spawn_id is not
> longer connected. I detect this with expect eof as illustrated below:

> proc logByTracing {array element op} {
>   uplevel {
>     global logfile

>     if { [info exists logfile($expect_out(spawn_id))] } {
>        set file $logfile($expect_out(spawn_id))
>        log2File $file $expect_out(buffer) 0
>        flush $file
>     }
>   }
> }

> Comment: log2File is a simple proc to log data to a given file handle.

> logByTracing

> set spid1 [ connect2Host $hostname]

> expect {
>     -i $spid1 eof {
>         #reconnect to the host
>         puts "disconnect from $hostname. Reconnecting."
>         set spid1 [connect2Host $hostname]
>     }

>     :
>     :
> }

> My question is this. After detecting eof as shown above, and respawning the
> process, do I have to call logByTracing again? Or is it not needed to be
> called again?

> Thanks,
> JS

This depends on how you established the trace.

Don



Sun, 19 Feb 2006 00:25:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Log by Tracing Question

2. Expect: Log by tracing question

3. trace log in error

4. Problem with logging multiple processes in Expect via trace

5. Expect: Help with Logging by Tracing

6. Stumper Question for me: simple question for this group -exponential and logs

7. command traces interfere with step traces (bug?)

8. TIP #102: Change [trace list] to [trace info]

9. trace on & trace off

10. Sorting with O(n.log(log(n)))

11. Scratchy 0.5 - Report Generator and Log Parser for Apache access logs

12. VA - tracing question

 

 
Powered by phpBB® Forum Software