{"name":"diag_log","title":"diag log","type":"command","url":"https://community.bistudio.com/wiki/diag_log","revid":379412,"updated":"2026-10-31T00:03:05Z","groups":["Diagnostic"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Dumps the argument's value to the report file. Each call creates a new line in the file.","syntaxes":[{"syntax":"diag_log output","params":[{"name":"output","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"output"}}],"examples":[{"code":["diag_log time;"]},{"code":["diag_log format [\"%1, %2\", player, time];"]},{"text":"```sqf\n_array = [1, \"foo\", player, \"bar\"];\n{\n    diag_log _x;\n} forEach _array ; // creates 4 entries on 4 lines\n```","code":["_array = [1, \"foo\", player, \"bar\"];\n{\n\tdiag_log _x;\n} forEach _array ; // creates 4 entries on 4 lines"]},{"code":["_array = [1, \"foo\", player, \"bar\"];\ndiag_log _array; // Creates one entry of e.g. [1,\"foo\",B Alpha 1-1:1 (Player Name),\"bar\"]"]}],"see_also":["arma.RPT","diag_dumpCalltraceToLog","diag_stacktrace","copyToClipboard","copyFromClipboard","diag_fps","diag_fpsMin","diag_frameNo","diag_tickTime","diag_deltaTime"],"notes":[{"user":"Master85","date":"2009-06-08T22:39:00Z","text":"To dump a string without \"\" use text."},{"user":"Demonized","date":"2011-04-19T23:35:00Z","text":"in patch 1.59 there is a limit of 1044 characters to be printed, no error or crash but diag_log line will simply end at character number 1044."}]}