{"repo":"r-dbi/dblog","free":true,"listed":false,"github":"https://github.com/r-dbi/dblog","clone":"git clone https://github.com/r-dbi/dblog.git","description":"Logging for DBI","language":"R","stars":10,"topics":["r","dbi","database","logging"],"license":null,"category":"databases-storage","readme_excerpt":"dblog The goal of dblog is to implement logging for arbitrary DBI backends, similarly to Perl’s DBI::Log. This is useful for troubleshooting and auditing codes that access a database. The initial use case for this package is to help debugging DBItest tests. Installation You can install the released version of dblog from CRAN with: Install the development version from GitHub using Basic example The dblog driver wraps arbitrary drivers: All calls to DBI methods are logged, by default to the console. The log is runnable R code\\! Run it in a fresh session to repeat the operations, step by step or in an otherwise controlled fashion. dblog is smart about DBI objects created or returned, and will assign a new variable name to each new object. Cleared results or closed connections are not removed automatically. Logging options Logging can be redirected to a file, optionally all outputs may be logged as well. For example, use a collecting logger to output all calls and results after the fact. Logging complex operations The full power is demonstrated when running with code where the underlying DBI operations are not obvious: Inheritance hierarchy Despite the common suggestion to prefer composition over inheritance, the new logging classes are implemented as subclasses of the actual DBI classes. Moreover, the class definitions are created on demand: for each different database backend, different subclasses are defined, to make sure dispatch is routed to the right methods. The reason for","default_branch":null,"files":null,"tree":[],"storefront":"/r/r-dbi","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/r-dbi/dblog/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}