{"id":7007,"date":"2025-08-28T22:11:56","date_gmt":"2025-08-29T03:11:56","guid":{"rendered":"https:\/\/librarytestdev.wpenginepowered.com\/?post_type=doc&#038;p=7007"},"modified":"2025-09-04T17:17:22","modified_gmt":"2025-09-04T22:17:22","slug":"logging","status":"publish","type":"doc","link":"https:\/\/library-staging.tradingtechnologies.com\/apis\/tt-core-sdk\/getting-started-with-tt-core-sdk\/logging\/","title":{"rendered":"Logging"},"content":{"rendered":"\n<p>TT logs messages for your application and stores them in the &#8216;\/var\/log\/TT&#8217; directory.<\/p>\n<p>\n  You can write additional information to the TT Core SDK log\n  files by using the following function:\n<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\">\n  <div class=\"highlight\">\n    <pre class=\"highlight\"><code>void TTLog(const LogLevel level, const char* category, const char *msg);\n<\/code><\/pre>\n  <\/div>\n<\/div>\n\n<p>The LogLevel enumeration is defined as follows:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\">\n  <div class=\"highlight\">\n    <pre class=\"highlight\"><code>\ntypedef enum\n{\n    LogDebug = 0,\n    LogInfo = 10,\n    LogWarning = 20,\n    LogError = 30,\n    LogCritical = 40,\n    LogAlways = 100\n} LogLevel;\n\n<\/code><\/pre>\n  <\/div>\n<\/div>\n\n<p>\n  The <strong>LogAlways<\/strong> value is used for messages\n  which must be logged regardless of the minimal logging level.\n<\/p>\n\n<p>\n  You can also use the following convenience functions that\n  pre-define the logging levels.\n<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\">\n  <div class=\"highlight\">\n    <pre class=\"highlight\"><code>\nvoid TTLogInfo(const char *format, ...) __attribute__((format(printf, 1, 2)));\n\nvoid TTLogWarning(const char *format, ...) __attribute__((format(printf, 1, 2)));\n  \nvoid TTLogError(const char *format, ...) __attribute__((format(printf, 1, 2)));\n\n<\/code><\/pre>\n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>TT logs messages for your application and stores them in the &#8216;\/var\/log\/TT&#8217; directory. You can writ [&hellip;]<\/p>\n","protected":false},"author":2,"template":"wp-custom-template-single-doc-tt-core-sdk","meta":{"_acf_changed":false,"footnotes":""},"docs-category":[444],"class_list":["post-7007","doc","type-doc","status-publish","hentry","docs-category-getting-started-with-tt-core-sdk"],"acf":[],"_links":{"self":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/7007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/7007\/revisions"}],"wp:attachment":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/media?parent=7007"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/docs-category?post=7007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}