BonVivant's picture
Jul 12, 2013
3867 views
Reputation: 79

Log history

There is any way to see who and when was log in at the samba

2 answers

emreeren's picture
emreeren
Jul 14, 2013
Reputation: 595

I can build a text file generator action to append data to a text file so you can handle any event you like (user logged in - logged out for example) and generate a log file. I've created an issue about it here https://github.com/emreeren/SambaPOS-3/issues/270 . If you track that you'll get a notification when implemented.

i try to use the new accion, here are a print screen i need to generate new line every time thar it user change, but i cant get it, i sopuse that its the same at the printer template or the widget configuration, of course i was grong, this is what i get in the txt file:

{DATE}{TIME} | {USER NAME}

{DATE}{TIME} | {USER NAME}

{DATE}{TIME} | {USER NAME}

{DATE}{TIME} | {USER NAME}

{DATE}{TIME} | {USER NAME}

{DATE}{TIME} | {USER NAME}

{DATE}{TIME} | {USER NAME}

{DATE}{TIME} | {USER NAME}

<L10>{DATE}{TIME} | {USER NAME}

 

JohnSCS's picture
JohnSCS
Aug 09, 2013
Reputation: 271

The problem is that you cannot use Printer Template Tags with Rules & Actions. Thats why you are getting this result.

The easiest way is to call a Batch file at User Login to record date, time & user.

Create a file callled - c:\userlog.bat
Insert the following into this file

@ECHO OFF
FOR /F "TOKENS=2-4 DELIMS=/ " %%a IN ("%date%") DO SET dd=%%a&SET mm=%%b&SET yy=%%c
FOR /F "TOKENS=1-3 DELIMS=:." %%a IN ("%time%") DO SET hh=%%a&SET tt=%%b&SET ss=%%c
echo %yy%-%mm%-%dd% %hh%:%tt%:%ss% %1>>c:\userlog.txt

Create an Action - User Log
Action Type - Start Process
FileName - c:\userlog.bat
Arguments - [:Value]
UseShell - True
IsHidden - True

Create a Rule - User Log
Event - User Login
Action - User Log, Value - [:UserName]
Mapping - *,*,*,*

When you login, the Date, Time & Username is logged into c:\userlog.txt

 

We have already answers to
1030 questions
E-Posta Facebook Twitter RSS Skype
Telefon (212) 252 0634