aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_dbg.h
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2018-11-05 14:37:39 +0100
committerMicael Karlberg <[email protected]>2018-11-05 14:37:39 +0100
commit6fcbb97c0b7f082c4934d7765c6b63222f317ef2 (patch)
tree81a6bc18671c3ed8981e40e416719e1d5648bb19 /erts/emulator/nifs/common/socket_dbg.h
parentc6767f0a6dc66971df4425c216024c47993a310b (diff)
downloadotp-6fcbb97c0b7f082c4934d7765c6b63222f317ef2.tar.gz
otp-6fcbb97c0b7f082c4934d7765c6b63222f317ef2.tar.bz2
otp-6fcbb97c0b7f082c4934d7765c6b63222f317ef2.zip
[socket-nif] Make it possible to send (nif) debug to file
Make it possible to open a file and send debug printouts to (instead of stdout) for debug printouts from the nif-code. OTP-14831
Diffstat (limited to 'erts/emulator/nifs/common/socket_dbg.h')
-rw-r--r--erts/emulator/nifs/common/socket_dbg.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/erts/emulator/nifs/common/socket_dbg.h b/erts/emulator/nifs/common/socket_dbg.h
index ad0fcdada9..47739b46da 100644
--- a/erts/emulator/nifs/common/socket_dbg.h
+++ b/erts/emulator/nifs/common/socket_dbg.h
@@ -27,6 +27,10 @@
#ifndef SOCKET_DBG_H__
#define SOCKET_DBG_H__
+/* Used when calling the init function */
+#define ESOCK_DBGOUT_DEFAULT "stdout"
+#define ESOCK_DBGOUT_UNIQUE "unique"
+
/* Used in debug printouts */
#ifdef __WIN32__
@@ -45,7 +49,7 @@ typedef unsigned long long llu_t;
}
-extern
-void esock_dbg_printf( const char* prefix, const char* format, ... );
+extern void esock_dbg_init(char* filename);
+extern void esock_dbg_printf( const char* prefix, const char* format, ... );
#endif // SOCKET_DBG_H__