Get log stream
authorGeoff Levand <geoffrey.levand@am.sony.com>
Wed, 25 Mar 2009 12:35:48 +0000 (12:35 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 30 Mar 2009 09:20:00 +0000 (20:20 +1100)
Add a new convenience routine pb_log_get_stream() that returns the
current PB_log stream.  Used to setup the ps3-utils library to log
to the pb_log.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
lib/log/log.c
lib/log/log.h

index 41b44cc10ff9e02aa227d7ae0e4ccd3592052265..697af6c0760ec612d328f03de59ee7be1a86b1a2 100644 (file)
@@ -27,6 +27,11 @@ void pb_log_set_stream(FILE *stream)
        logf = stream;
 }
 
+FILE * pb_log_get_stream(void)
+{
+       return logf;
+}
+
 void pb_log_always_flush(int state)
 {
        always_flush = state;
index 813a19e293773fd9f72ad5c8092a7498d9b65a54..2a5d375d8cdfe38951042daa46e9458d178f1ade 100644 (file)
@@ -5,6 +5,7 @@
 
 void pb_log(const char *fmt, ...);
 void pb_log_set_stream(FILE *stream);
+FILE * pb_log_get_stream(void);
 void pb_log_always_flush(int state);
 
 #endif /* _LOG_H */