Jump to content
Arkensor

A3Log - A lightweight logging extension

Recommended Posts

Hi one question,

 

does this logger work in server config.cfg event handlers(onUnsignedData, onHackedData,...)?

 

I want to log failed connects to server. I want to know why it happens.

 

Cheers, IA.

 

Hey there,

 

I have never tried that out. I am not familiar with serverside scripting via those event handlers. If you are able to perform a callExtension there, then yes you could use it, and just pass the private variable information from the evvenhandlers in the given format, like describen in the main post.

 

A feedback about it would be great, if it works or not :)

 

 

Regards Arkensor

Share this post


Link to post
Share on other sites

Hi, i finaly tested your logger but it seems like nothing happens. No logs or errors are produced.

This is what i have tried...

onUserConnected = "['I am Superman!'] call A3Log;";
onUserConnected = "[""I am Superman!""] call A3Log;";

Any idea?

Share this post


Link to post
Share on other sites

I will investigate on what is possible with those server side scripting things tomorrow. If available callExtension would be the way to go. But not even diag_log seems to work in that pice of "beatiful and intelligent designed" function


Regards Arkensor

Share this post


Link to post
Share on other sites

because that's not supported in this specials server commands, only kick and ban

That was what dwarden said. So not it is not possbile @IcyAxe

 

However you could use the eventhandlers like onPlayerConnected & onPlayerDisconnected on the server side and call the extension / or the A3Log funtion from there.

 

 

Regards Arkensor

Share this post


Link to post
Share on other sites

Hello folks,

 

the next release will feature a optional console output, as that might be easier for some layz debugging people, who do not even want to open a logfile, but recive information as soon as it is passed to the DLL.

 

As always, if you have got a suggestion feel free to post it here to contact me via pm.

 

 

Regards Arkensor

  • Like 1

Share this post


Link to post
Share on other sites

Release will be this weekend. People who want to pre release test it may pm me or write me in the offical arma discord :)

 

Important: Please update your config after each version, since I change it 99% of the time. If you do not update your config you will miss out all the features

 

zEvRR9d.png

  • Like 1

Share this post


Link to post
Share on other sites

Hey there,

 

i will update the main post, since it the forum upgrade destroyed it, and also build and release the x64 versions of the dlls asap.

Expect both to happen this weekend.

Maybe x64 unlocks some potencial for A3Log, in case of performace.

I will also try to get BE whitelist the new dlls, so that you can finally use them as client mod too.

 

Regards Arkensor

  • Like 2

Share this post


Link to post
Share on other sites

Release 1.7 incoming ... 

I tested the windows x64 version and it worked without any issues, but someone should test it for linux and provide me feedback please ;)

 

Also the main post is fixed now :)

Share this post


Link to post
Share on other sites
1 hour ago, salihf7 said:

Can I print different files?

 

Sure it can, just have a look at the configuration .ini files to setup multiple output files

  • Like 1

Share this post


Link to post
Share on other sites

Hi Dudes!

May someone can give me hint on how to use this plugin.. i searched for 2 hours but couldnt start over..

example logs are working so im on setting up some "own" logentrys..

 

i dont know if i can use the loadinit to put some code in there to log functions like

onPlayerconnect ["%playername% connected","connectionlog"] call A3Log;

or if i should put a string like

["%playername% connected","connectionlog"] call A3Log

into the function file itself..

 

maybe some of u be nice and give me a short startup? =)

ty in advance

Share this post


Link to post
Share on other sites

Hello @Pinguin Bronson,

 

based on your code example: 

 

onPlayerconnect {
	[format["%1 connected", _name],"connectionlog"] call A3Log;
};

This would do the job.

Share this post


Link to post
Share on other sites

Hello! Ive started using this extension and sometimes it starts and other times it does not. you know why? I've changed the folder to another server addon and changed the config. When it starts, everything is ok :S Help!

Share this post


Link to post
Share on other sites
On 26.9.2017 at 11:58 AM, JuanAdamuz97 said:

Hello! Ive started using this extension and sometimes it starts and other times it does not. you know why? I've changed the folder to another server addon and changed the config. When it starts, everything is ok :S Help!

 

You need to be more precise than that and describe me what you mean by >it does not start<

I would suggest if something seems to be broken, that you redownload it and change the options step by step to see where you might did something wrong. Also i would not suggest addon the addons and dlls into another @mod folder

Share this post


Link to post
Share on other sites

Hey my Friends 

 

i want to use this Logging for my Altis Life Server and i want to log all moneytransfer. So i have i nsert this line to my "fn_receiveMoney.sqf"

 

whats wrong with that ? 

 

here the complete file. When i become an example with i understand this system than i dont need more help :/

 

#include "..\..\script_macros.hpp"
/*
    File: fn_receiveMoney.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Receives money
*/

params [
    ["_unit",objNull,[objNull]],
    ["_val","",[""]],
    ["_from",objNull,[objNull]]
];

if (isNull _unit || isNull _from || _val isEqualTo "") exitWith {};
if !(player isEqualTo _unit) exitWith {};
if (!([_val] call TON_fnc_isnumber)) exitWith {};
if (_unit == _from) exitWith {}; //Bad boy, trying to exploit his way to riches.

hint format [localize "STR_NOTF_GivenMoney",_from getVariable ["realname",name _from],[(parseNumber (_val))] call life_fnc_numberText];
CASH = CASH + parseNumber(_val);
[0] call SOCK_fnc_updatePartial;
/*
Goodlife Logging - Money Log
*/
[format[_unit, "hat von", _from, _val, "dollar bekommen.","AltisLife"]] call A3Log;

 

Share this post


Link to post
Share on other sites

Here is the New File and nothing change  the log files are not created and no error in my rpt file . 

#include "..\..\script_macros.hpp"
/*
    File: fn_receiveMoney.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Receives money
*/

params [
    ["_unit",objNull,[objNull]],
    ["_val","",[""]],
    ["_from",objNull,[objNull]]
];

if (isNull _unit || isNull _from || _val isEqualTo "") exitWith {};
if !(player isEqualTo _unit) exitWith {};
if (!([_val] call TON_fnc_isnumber)) exitWith {};
//aus zum testen//if (_unit == _from) exitWith {}; //Bad boy, trying to exploit his way to riches.

hint format [localize "STR_NOTF_GivenMoney",_from getVariable ["realname",name _from],[(parseNumber (_val))] call life_fnc_numberText];
/*
Goodlife Logging - Money Log
*/
[format["%1, hat von %2 %3 dollar bekommen.",_unit, _from, _val],"AltisLife"] call A3Log;
CASH = CASH + parseNumber(_val);
[0] call SOCK_fnc_updatePartial;

//Test A3Log
["I am Batman!","AltisLife"] remoteExecCall ["A3Log", 2];
// Goodlife Logging Geld geben
[format["Der Spieler %1 hat von %2 - %3 bekommen.", _unit, _from, _val],"AltisLife"] call A3Log;
[format["%2 (%3) --> %1 bekommen.", _unit, _from, _val],"AltisLife"] call A3Log;

 

Share this post


Link to post
Share on other sites

 

Hello everyone ... sorry, I know the discussion is old, but I need a little help if possible ... I uploaded via FTP the folder @ A3Log to the directory where I have all the mods .... I added to the list mod (both -mod and -Servermod) @ A3log ... I compiled the .ini file .... As soon as I start a mission and try a simple "[" I am Superman! "] Call A3Log;" , this error appears in the RPT file: "Call extension 'A3Log' could not be loaded: The specified module could not be found." can someone help me? Thank you!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×