Commit graph

1,028 commits

Author SHA1 Message Date
Goffi
cc010fba59 core: fixed typo 2014-05-15 20:25:52 +02:00
Goffi
e3f0fe289e core: getReady and asyncConnect now wait full initialisation, not only memory 2014-05-15 20:01:56 +02:00
Goffi
a3f460d391 plugin text commands: added /me command to avoid the need to escape the / 2014-05-15 19:51:53 +02:00
Goffi
a2f1522efd bridge (constructor): fixed D-Bus frontend generator for async method without sig_in + fixed --debug option + regenerated bridge to fix bad frontend D-Bus bridge. 2014-05-15 16:35:28 +02:00
Goffi
f0b2c7dea3 core: added a getReady method which can be called by frontends to ensure that backend is fully initialised before doing anything + this ckeck is automatically done in asyncConnect 2014-05-15 16:02:16 +02:00
souliane
561cc93a04 test: fix the tests after the changes of logging system 2014-05-14 13:26:23 +02:00
Goffi
ed2abd3971 core (log): moved configuration to core.log_config; this avoid import issues with pyjamas. 2014-05-14 12:51:24 +02:00
souliane
daa4b0b30b plugin misc_static_blog: renamed from tmp_blog_banner, now also with page's title, meta keywords and description 2014-05-13 17:17:57 +02:00
souliane
1eeddf5900 better PEP-8 compliance 2014-05-07 15:44:31 +02:00
Goffi
ee26391a11 core (i18n): use logging system instead of print 2014-05-08 19:11:47 +02:00
Goffi
9905e14d0c core (log): added "custom" backend 2014-05-08 19:11:20 +02:00
Goffi
2aeada884e core (logs): workaround for pyjamas bug 2014-05-08 17:16:15 +02:00
souliane
2e6420fb49 memory, jp: added jp commands to load/save parameters template 2014-05-04 18:43:54 +02:00
Goffi
675921a7d7 core: if in debug mode and ipdb is present, use ipdb instead of pdb 2014-05-05 20:16:14 +02:00
Goffi
2802250596 core (log/standard backend): added "%(profile)s" format management 2014-05-05 20:16:13 +02:00
Goffi
ad9c41cbc2 core(log): standard backend: colors are now checked on a per handler basis 2014-05-05 20:16:08 +02:00
Goffi
2fddb02872 wix: use of new logging system 2014-05-05 20:12:21 +02:00
Goffi
39989cc985 primitivus: use of new logging system:
- default output is \\memory
    - logs can be seen with :messages command
    - now useless writeLog method has been removed
2014-05-05 20:12:19 +02:00
Goffi
468206e529 quick_frontend: use of new logging system 2014-05-05 18:58:34 +02:00
Goffi
233d4b4268 core (log): added magic %(profile)s key to log_fmt:
if %(profile)s is used in log_fmt, SàT try to find profile value using introspection. This is for debugging purpose only, *DO NOT* use in production. This key don't work (yet ?) with standard backend, and will not work in every frontend.
2014-05-05 18:58:34 +02:00
Goffi
ba103161d5 core (log): refactoring + twisted backend:
- configuration is now done with classes, so inheritance is possible
    - twisted backend now use twisted log methods
    - log not produced by SàT directly in twisted backend are captured by an observer (twistedObserver) and sent back to SàT logging chain, with the "twisted" logger.
    - \\default output use normal twistd output, except in debug mode where it add an stdout output in addition to the log file.
    - when log_colors = True, colors are enabled only where it's possible (tty out), when log_colors=force colors are always enabled.
    - fixed some bad log.xxx calls
2014-05-05 18:58:34 +02:00
Goffi
737e784c3d core (log): added advanced feature to basic backend (colors/formatting/level and logger filtering) 2014-05-05 18:58:34 +02:00
Goffi
64384dc8bf core (logs): added formatting, name filter and outputs management:
- formatting is inspired from, and use when possible, standard logging. "message", "levelname", and "name" are the only format managed, depending on backend more can be managed (standard backend formats are specified in official python logging doc)
    - name filter use regular expressions. It's possible to log only plugins with SAT_LOG_LOGGER="^sat.plugins". To log only XEPs 96 & 65, we can use SAT_LOG_LOGGER='(xep_0095|xep_0065)'
    - output management use a particular syntax:
        - output handler are name with "//", so far there are "//default" (most of time stderr), "//memory" and "//file"
        - options can be specified in parenthesis, e.g. "//memory(50)" mean a 50 lines memory buffer (50 is the current default, so that's equivalent to "//memory")
        - several handlers can be specified: "//file(/tmp/sat.log)//default" will use the default logging + a the /tmp/sat.log file
        - if there is only one handler, it use the file handler: "/tmp/sat.log" is the same as "//file(/tmp/sat.log)"
    - not finished, need more work for twisted and basic backends
2014-05-05 18:58:34 +02:00
souliane
86d90d66aa core (constants): use realpath instead of abspath + do not import it when building libervia 2014-05-01 11:14:25 +02:00
souliane
4b8ba7a6f4 memory: fixes the method fixLocalDir for pid_dir and log_dir to use local_dir as default 2014-04-30 19:54:21 +02:00
souliane
42b1b6c4ed plugins TEXT-COMMANDS, XEP-0045, XEP-0048, XEP-0249:
- give a feedback instead of sending the message when the command is invalid or used in a wrong context
    - add command /join for XEP-0249
2014-04-30 16:34:09 +02:00
souliane
c7f12fc904 core: fixes constants.py 2014-04-27 18:51:03 +02:00
souliane
f3a0686176 primitivus: fixes contact group update 2014-04-27 18:22:12 +02:00
souliane
f0fa9b699d plugin XEP_0033: fixes the server part and the tests 2014-04-11 11:02:42 +02:00
Goffi
d89044dbbc tests: fixed log init in helpers (log init must be done before any call to a log method) 2014-04-23 12:01:59 +02:00
Goffi
edf5db192f test: configuration/use of new logging system 2014-04-21 20:04:52 +02:00
Goffi
a3186ac2e3 tests: fixed import in test_helpers_plugins 2014-04-21 19:45:10 +02:00
Goffi
8cd6bed824 plugin XEP-0096: fixed a bug introduced by the log refactoring 2014-04-20 11:51:48 +02:00
Goffi
317342b616 core (log): configuration and environment variables are now checked for log level and colors:
- variable change logs behaviour, so far only level and colors are implemented
    - configuration use log_[name], for example you can put log_level=debug in sat.conf (section [DEFAULT]) to see all levels
    - environment variables use SAT_LOG_[NAME]: e.g. SAT_LOG_LEVEL=debug
    - colors can be true, false or force to force colors even if stdout is not a tty
2014-04-19 20:11:23 +02:00
Goffi
501bc92528 core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
2014-04-19 19:19:19 +02:00
Goffi
dc5c042fe7 core (log): twisted backend use logging methods instead of log.msg 2014-04-19 16:48:26 +02:00
Goffi
f05724db74 core: logging refactoring, first step:
- added a core.log module
    - 3 backends can be used: basic, standard (python's logging module) or twisted
    - colors can be used
    - the module has been made to be used by frontends, it should work in exotic environments like pyjamas
    - logging basic configuration is now made in sat.tac
    - core.log configuration is inspired from python standard logging, and use it when possible
    - getLogger should be used the same way as for standard logging
2014-04-19 00:02:38 +02:00
Goffi
28ad5741fd core (constants): added some basic ANSI escape codes 2014-04-18 23:36:52 +02:00
Goffi
3fcd7e22d9 plugins XEP-0048, XEP-0049: feature is not checked anymore before using private XML storage, as feature announcement is not mandatory in XEP-0049 2014-04-10 16:12:50 +02:00
Goffi
acce568f57 core (stdui): added forgotten __init__.py 2014-04-08 09:50:45 +02:00
souliane
e91a30729f core, frontends: unify the roster management UIs in sat/stdui/ui_contact_list.py 2014-04-03 16:10:44 +02:00
Goffi
9dcec3eab7 jp: added bookmarks subcommands 2014-04-07 16:24:29 +02:00
Goffi
643aa4dfb7 plugin XEP-0048: bookmarks deletion + added "delete" option for /bookmark command 2014-04-07 16:24:29 +02:00
Goffi
7b971278f8 plugin XEP-0048: added list of bookmarks in XMLUI, selecting one join the room 2014-04-07 16:24:28 +02:00
Goffi
bdd0673a9d plugin XEP-0048: added /bookmark text command 2014-04-07 16:22:35 +02:00
Goffi
63e668ec01 plugin XEP-0048: bookmarks (first draft) 2014-04-07 16:22:35 +02:00
Goffi
c497e19b25 core (XMLUI): _cleanValue method to avoid issues with DBus types (must be deleted in the future) 2014-04-07 16:22:35 +02:00
Goffi
da7496c162 plugin XEP-0049: private xml storage 2014-04-07 16:22:35 +02:00
Goffi
3fc2e256f2 core (memory): added __iter__ to PersistentDict 2014-04-07 16:22:33 +02:00
Goffi
e2e1bb50c2 plugin XEP-0115: minor logs improvment 2014-04-07 16:22:18 +02:00