summaryrefslogtreecommitdiff
path: root/firmware/logf.c (follow)
Commit message (Collapse)AuthorAge
* Don't add new message to logf when we dump it to fileMihail Zenkov2016-04-04
| | | | | | | | Fix log file corruption if we have new messages at dumping log to file. Comment removed as it incorrect. We store all messages in direct order (last message at end of file). Change-Id: I4acfa8a0935cc41a889e08f6bc42974fefd1ade2
* Make a few local variables staticThomas Jarosch2015-01-11
| | | | Change-Id: Ieb77a7f2cdf765afa3121320d03c0478cd97eb0f
* Add missing va_end() call when the log is fullThomas Jarosch2014-12-20
| | | | | | | | | No need to go out of memory, too ;) cppcheck reported: [rockbox/firmware/logf.c:338]: (error) va_list 'ap' was opened but not closed by va_end(). Change-Id: I00e4c04d7e3d5d1415aa5066487ce1d9209e53aa
* events: Rework event subsystem (add_event, send_event) to be more versatile.Thomas Martitz2014-03-14
| | | | | | | | | | | | | | | | | | add_event_ex is added that takes an extra user_data pointer. This pointer is passed to the callback (add_event and add_event_ex have slightly different callbacks types). All callbacks also get the event id passed. Events added with add_event_ex must be removed with remove_event_ex because the user_data pointer must match in addition to the callback pointer. On the other add_event is simplified to omit the oneshort parameter which was almost always false (still there with add_event_ex). As a side effect the ata_idle_notify callbacks are changed as well, they do not take a data parameter anymore which was always NULL anyway. This commit also adds some documentation to events.h Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
* Print `last logf lines on panic().Frank Gevaerts2014-01-11
| | | | | | | | | | | | If logf is enabled, panic() will print the last lines. On small screens this is more or less useless, but on large screens it can be very useful for debugging. Change-Id: I26dfc76e9ac4a2ddc2def8db1616a04f943dbba3 Reviewed-on: http://gerrit.rockbox.org/709 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Reviewed-by: Frank Gevaerts <frank@gevaerts.be> Tested: Frank Gevaerts <frank@gevaerts.be>
* Fix logdiskAmaury Pouly2013-08-16
| | | | | | | | | | | | The code was broken in a subtle but crucial way: storage idle callbacks are oneshot so after the first flush everything would stay in the buffer forever and would never be written to the disk thus resulting into many events being lost. This changed correctly registers the idle callback each time the buffer is not empty. Note that the idle storage code checks if a callback has is in the queue already so we don't register twice. Change-Id: Ifdf331d4b757e05b8a6902bf5926cbc7689f5109
* Remove copy/pasted preprocessor defines that shouldn't have been included.Michael Giacomelli2012-08-06
| | | | | | | | Also, add dummy defines for application targets so that ERRORF, etc map to DEBUGF instead of a compile error and add a new line at the end of logf.c. Change-Id: Ie7c5bc3397a853af619e810defce6123114e7a51
* Introduce logging to disk feature into rockbox.Michael Giacomelli2012-08-07
| | | | | | | | | | | | | | | | | Logs information, errors, etc to disk using the register_storage_idle_func mechanism to write to the disk when available. Currently, this is disabled in normal builds, but can be enabled by adding ROCKBOX_HAS_LOGDISKF to the config file. By default, it uses a 2KB buffer and drops text if the buffer overflows. The system includes a simple warning level mechanism that can be used to by default exclude non-serious errors from logging on release builds. Change-Id: I0a3d186a93625c7c93dae37b993a0d37e5a3a925 Reviewed-on: http://gerrit.rockbox.org/288 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info> Tested-by: Michael Giacomelli <mgiacomelli@gmail.com> Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
* Make logf() output to serial optionalRalf Ertzinger2012-02-16
| | | | | | | | | | Only output logf() to the serial port if LOGF_SERIAL is defined (in addition to HAVE_SERIAL). Add an option to advanced configure to set this (defaults to off). Change-Id: I13d0f5df391e5371f7797f46a3faaf7a6974b9e4 Reviewed-on: http://gerrit.rockbox.org/92 Reviewed-by: Björn Stenberg <bjorn@haxx.se>
* Only use lcd-remote.h #ifdef HAVE_REMOTE_LCDRafaël Carré2012-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31613 a1c6a512-1295-4272-9138-f99709370657
* Fix a logf bug which would trigger undefined behaviour(and probably crash) ↵Amaury Pouly2010-08-02
| | | | | | when both DEBUG, CONFIG_PLATFORM & PLATFORM_HOSTED are enable git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27663 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* vuprintf does not belong in stdio.h, causes problems with other versions of ↵Jeffrey Goode2010-05-15
| | | | | | stdio.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26042 a1c6a512-1295-4272-9138-f99709370657
* Revert r25854 which was bad for the database tool (I forgot it still needs ↵Thomas Martitz2010-05-06
| | | | | | the wrappers from uisimulator/common/io.c). Fix it so it works for both. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25856 a1c6a512-1295-4272-9138-f99709370657
* Rename vfnprintf to vuprintf (u stands for user for the user callback and ↵Thomas Martitz2009-11-03
| | | | | | data passed to it) to avoid confusion with file and buffer size related functions from the printf-family, and add a comment to its declaration. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23503 a1c6a512-1295-4272-9138-f99709370657
* Echoes logf output to the sim console when logf build is enabledJeffrey Goode2009-11-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23485 a1c6a512-1295-4272-9138-f99709370657
* A new implementation of logf, logfdisplay and logfdump.Maurus Cuelenaere2009-08-21
| | | | | | | | Flyspray: FS#10528 Author: Amaury Pouly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22462 a1c6a512-1295-4272-9138-f99709370657
* Fix a wrong memcpy in logf() introduced in r22253Rafaël Carré2009-08-12
| | | | | | | Flyspray: FS#10515 Author: Amaury Pouly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22276 a1c6a512-1295-4272-9138-f99709370657
* Fix logf() multilines handlingRafaël Carré2009-08-11
| | | | | | | | | | | | Each line (of MAX_LOGF_ENTRY characters) would be marked with LOGF_TERMINATE_CONTINUE_LINE, but still be padded with a '\0' This also reverts r22250 which worked around the problem in logfdump() Flyspray: FS#10513 Author: Amaury Pouly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22253 a1c6a512-1295-4272-9138-f99709370657
* FS#10080Nils Wallménius2009-07-14
| | | | | | | | | | * Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
* Reorganise USB stack defines. Now config.h decides which class drivers get ↵Frank Gevaerts2009-05-23
| | | | | | | | | enabled instead of usb_core.h Also enable HID, and use that as the dummy class instead of charging-only for controllers that have working interrupt transfers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21053 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9970 by Yoshihisa Uchida: fix building when HAVE_SERIAL & ↵Maurus Cuelenaere2009-03-11
| | | | | | ROCKBOX_HAS_LOGF is defined in a simulator build git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20291 a1c6a512-1295-4272-9138-f99709370657
* Fix building of tools/database/Frank Gevaerts2009-02-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19940 a1c6a512-1295-4272-9138-f99709370657
* Fix (USB) serial logf()Maurus Cuelenaere2009-01-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19634 a1c6a512-1295-4272-9138-f99709370657
* Fix off-by-oneMaurus Cuelenaere2008-12-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19626 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9733 (multiline logf) by Yoshihisa UchidaMaurus Cuelenaere2008-12-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19625 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* FS#9051 - remove LCD margins... use viewports if you need them...Jonathan Gordon2008-06-23
| | | | | | | | | | | NOTE to WPS people.... %m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored. Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected. Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
* implement logf over usb-serial. Needs USB_SERIAL defined in usb_core.h to ↵Frank Gevaerts2008-03-02
| | | | | | | | | work, and needs to be enabled in the debug menu. It stops sending data after a while for unknown reasons. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16486 a1c6a512-1295-4272-9138-f99709370657
* Support building tagcache db natively on PC using the core of theMiika Pekkarinen2006-11-10
| | | | | | | | | Rockbox tagcache database engine. Only host endian support at the moment and no command line parameters. Mainly for developers for debugging at the moment. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11497 a1c6a512-1295-4272-9138-f99709370657
* Logf output on the serial port for h100 targetsLinus Nielsen Feltzing2006-10-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11207 a1c6a512-1295-4272-9138-f99709370657
* better logfMichiel Van Der Kolk2005-06-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6949 a1c6a512-1295-4272-9138-f99709370657
* Moved to logf.hTomas Salfischberger2005-06-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6808 a1c6a512-1295-4272-9138-f99709370657
* Modified logf to use a define for the log width, and changed it to default toDaniel Stenberg2005-06-01
| | | | | | | | 21 as that is what fits in an iriver LCD by default since the font is 6 pixels wide. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6547 a1c6a512-1295-4272-9138-f99709370657
* (Optional) logf supportDaniel Stenberg2005-05-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6538 a1c6a512-1295-4272-9138-f99709370657
* use proper remote lcd functionsDaniel Stenberg2005-05-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6522 a1c6a512-1295-4272-9138-f99709370657
* initial remote-LCD logf browserDaniel Stenberg2005-05-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6520 a1c6a512-1295-4272-9138-f99709370657
* Uses indices instead of pointersLinus Nielsen Feltzing2005-05-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6517 a1c6a512-1295-4272-9138-f99709370657
* initial logf() work, not added to SOURCES yet (on purpose)Daniel Stenberg2005-05-23
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6514 a1c6a512-1295-4272-9138-f99709370657