about summary refs log tree commit diff stats
path: root/src/log.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix errors in log.cMichael Vetter2020-02-221-1/+2
|
* get_log_file_location () should return const char*Michael Vetter2020-02-211-1/+1
| | | | Make clear that result should never be freed.
* Allow setting custom log file via -f FILENAMEMichael Vetter2020-02-211-10/+28
| | | | | `profanity -f TEST` will use `~/.local/share/profanity/logs/TEST.log` as the log file.
* Add vim modelineMichael Vetter2019-11-131-0/+1
|
* Actually log MUC PM messagesMichael Vetter2019-10-281-11/+11
| | | | | | | | | | If I'm not mistaken MUC PMs have not been logged at all if there was no other client sending carbons. This should add MUC PM logging functionality. We still need to make sure carbons log to the same file. Regards https://github.com/profanity-im/profanity/issues/1214
* Properly display chatwin historyMichael Vetter2019-10-211-1/+0
| | | | | | | | | | | | | | | | | | | | So far if one had enabled `/history` and did `/msg somenick` the history was loaded from file and displayed like this: ``` 04-04-17 15:23 - 3/4/2017: 01-01-00 10:30 - me: .... 01-01-00 10:31 - somebody: .... 01-01-00 10:32 - somebody: .... ``` So the first line contained the actual date. But the date used in each line was always 01-01-2000. This date was for some reason hardcoded. This commit now actually uses that date to build the proper GDateTime instead of just printing it. Fix https://github.com/profanity-im/profanity/issues/922
* Improve MUC 1:1 loggingMichael Vetter2019-10-071-25/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we get a private message from a user in a MUC profanity shows this like: `profanity@roomsASDF.dismail.de/Martin: Hi` This was so far logged at: `~/.local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismail.de/2019_09_04.log` as: ``` 10:48:13 - profanity@rooms.dismail.de: Hi ``` So the nickname was not saved anywhere. This is due to us not knowing whether we got a regular message from user@server.org/resource or a MUC PM from room@server.org/user. We now check for `<x xmlns='http://jabber.org/protocol/muc#user' />` and add the resourcepart to the logging if we get it. The file will be created at `~/.local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismail.de_nick` and look like: ``` 23:59:43 - nick: Hi ``` Fix https://github.com/profanity-im/profanity/issues/1184
* log: set nonblocking mode for stderrDmitry Podgorny2019-09-131-6/+16
| | | | | | | Glib can print error messages to stderr and blocking write freezes Profanity if the buffer is full. Move stderr to nonblocking mode in hope that glib will skip printing on EWOULDBLOCK error. In this case we lose some error messages, but Profanity continues working.
* Rename prof_message_t into ProfMessagePaul Fariello2019-06-201-4/+4
|
* Add prof_message_t to wrap all message attributesPaul Fariello2019-06-201-12/+12
| | | | | | | Probably missing copy of body to plain in carbon and privmessage. Only covers the incoming message path because goal is OMEMO decryption of untrusted message. Cover some of the log functions but not all.
* Add myself to copyrightMichael Vetter2019-06-171-0/+1
| | | | Like discussed with James.
* Iterate logfiles until 100 are reachedMichael Vetter2019-06-071-6/+9
| | | | Fix https://github.com/profanity-im/profanity/issues/519
* Log and print outgoing encrypted messagePaul Fariello2019-04-101-1/+63
|
* Add OMEMO message encryption and decryptionPaul Fariello2019-04-101-0/+34
|
* Update copyright to include 2019Michael Vetter2019-01-221-1/+1
|
* Fix gcc8 error about strncpyMichael Vetter2018-07-061-1/+1
| | | | | | | | | | | | | | | | | | With gcc8 we get the following error when stringop-truncation is on: ``` In function ‘_rotate_log_file’, inlined from ‘log_msg.part.2’ at src/log.c:201:17: src/log.c:231:5: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] strncpy(log_file_new, log_file, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/log.c: In function ‘log_msg.part.2’: src/log.c:228:18: note: length computed here size_t len = strlen(log_file); ^~~~~~~~~~~~~~~~ ``` Using memcpy instead of strncpy.
* Update copyrightJames Booth2018-01-211-1/+1
|
* Recreate chat log when removedJames Booth2017-06-131-1/+6
| | | | fixes #210
* Update CopyrightJames Booth2017-01-281-1/+1
|
* Remove copied char* in groupchat_log_chatJames Booth2016-07-261-9/+7
|
* Fix memory leaksJames Booth2016-07-251-1/+2
|
* Move all filepath handling to files.cJames Booth2016-07-241-37/+5
|
* Move xgd functionsJames Booth2016-07-241-2/+2
|
* Move resource conversionsJames Booth2016-07-241-1/+1
|
* Add config/files.cJames Booth2016-07-241-0/+1
|
* Tidy headersJames Booth2016-07-241-1/+0
|
* Update GPL link in headersJames Booth2016-07-241-1/+1
|
* Move connection fulljid functionJames Booth2016-05-061-6/+6
|
* Rename jabber_ functionsJames Booth2016-05-061-6/+6
|
* Updated copyrightJames Booth2016-02-141-1/+1
|
* Applied coding style to src/James Booth2015-10-261-40/+36
|
* Pass delay timestamp to all incoming chat eventsJames Booth2015-09-081-18/+7
|
* Dereference timestamp on chat loggingJames Booth2015-08-091-1/+6
|
* WIP fix for #516, needs memory cleanupJames Booth2015-06-291-14/+6
|
* log: Introduced stderr log handlerDmitry Podgorny2015-06-231-0/+103
| | | | | | | | This handler redirects stderr output to a pipe and gathers logs from the read end. The handler is called from main loop, therefore, if a function prints logs to stderr they will be put to log file only after function returns.
* Added PGP logging preferencesJames Booth2015-06-211-0/+34
|
* Use null check convention in log.cJames Booth2015-05-041-8/+8
|
* Move common chat logging code to log.cJames Booth2015-03-151-4/+74
|
* Updated copyrightJames Booth2015-02-101-1/+1
|
* Used g_hash_table_destroy to free logsJames Booth2015-02-101-4/+4
|
* Set file permissions for logsJames Booth2014-10-181-0/+4
|
* Added license exemption for OpenSSL to source headersJames Booth2014-08-241-0/+12
|
* Fixed memleak in chat log historyJames Booth2014-06-271-8/+11
|
* Fixed cppcheck warningsJames Booth2014-04-261-3/+2
|
* Added /log where commandJames Booth2014-04-131-0/+9
|
* Added /log shared settingJames Booth2014-04-131-5/+17
| | | | Issue #170
* Added /log rotate optionJames Booth2014-04-131-3/+5
|
* Updated copyrightJames Booth2014-03-091-1/+1
|
* Add level to log outputJames Booth2014-01-271-1/+23
|
* fixed segfault when home directory doesn't existDmitry Podgorny2014-01-031-27/+31
|