1// Copyright (c) Microsoft Corporation 2025
2// Z3 Go API: Logging functionality
21// OpenLog opens an interaction log file
22// Returns true if successful, false otherwise
23func OpenLog(filename string) bool {
25 defer logMutex.Unlock()
27 cFilename := C.CString(filename)
28 defer C.free(unsafe.Pointer(cFilename))
30 result := C.Z3_open_log(cFilename)
38// CloseLog closes the interaction log
41 defer logMutex.Unlock()
47// AppendLog appends a user-provided string to the interaction log
48// Panics if the log is not open
49func AppendLog(s string) {
51 defer logMutex.Unlock()
54 panic("Log is not open")
58 defer C.free(unsafe.Pointer(cStr))
62// IsLogOpen returns true if the interaction log is open
63func IsLogOpen() bool {
65 defer logMutex.Unlock()