mirror of
				https://github.com/laurivosandi/certidude
				synced 2025-10-31 01:19:11 +00:00 
			
		
		
		
	Add file based rotating log handler
This commit is contained in:
		| @@ -16,7 +16,7 @@ from certidude.decorators import serialize, event_source, csrf_protection | ||||
| from cryptography.x509.oid import NameOID | ||||
| from certidude import const, config | ||||
|  | ||||
| logger = logging.getLogger("api") | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| class CertificateStatusResource(object): | ||||
|     """ | ||||
|   | ||||
| @@ -7,7 +7,7 @@ from datetime import datetime | ||||
| from certidude import config, authority | ||||
| from certidude.decorators import serialize | ||||
|  | ||||
| logger = logging.getLogger("api") | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| class AttributeResource(object): | ||||
|     @serialize | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import hashlib | ||||
| from certidude import config, authority | ||||
| from certidude.auth import login_required | ||||
|  | ||||
| logger = logging.getLogger("api") | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| KEYWORDS = ( | ||||
|     (u"Android", u"android"), | ||||
|   | ||||
| @@ -9,8 +9,7 @@ from certidude.decorators import serialize | ||||
| from certidude.relational import RelationalMixin | ||||
| from jinja2 import Environment, FileSystemLoader | ||||
|  | ||||
| logger = logging.getLogger("api") | ||||
|  | ||||
| logger = logging.getLogger(__name__) | ||||
| env = Environment(loader=FileSystemLoader("/etc/certidude/scripts"), trim_blocks=True) | ||||
|  | ||||
| SQL_SELECT_INHERITED = """ | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
|  | ||||
| import click | ||||
| import logging | ||||
| import xattr | ||||
| from datetime import datetime | ||||
| from pyasn1.codec.der import decoder | ||||
| @@ -7,6 +8,8 @@ from certidude import config, authority, push | ||||
| from certidude.auth import login_required, authorize_admin | ||||
| from certidude.decorators import serialize | ||||
|  | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| # TODO: lease namespacing (?) | ||||
|  | ||||
| class LeaseDetailResource(object): | ||||
|   | ||||
| @@ -19,7 +19,7 @@ from cryptography.exceptions import InvalidSignature | ||||
| from cryptography.x509.oid import NameOID | ||||
| from datetime import datetime | ||||
|  | ||||
| logger = logging.getLogger("api") | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| class RequestListResource(object): | ||||
|     @login_optional | ||||
|   | ||||
| @@ -9,7 +9,7 @@ from cryptography import x509 | ||||
| from cryptography.hazmat.backends import default_backend | ||||
| from cryptography.hazmat.primitives.serialization import Encoding | ||||
|  | ||||
| logger = logging.getLogger("api") | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| class RevocationListResource(object): | ||||
|     def on_get(self, req, resp): | ||||
|   | ||||
| @@ -7,7 +7,7 @@ from certidude import authority | ||||
| from certidude.auth import login_required, authorize_admin | ||||
| from certidude.decorators import csrf_protection | ||||
|  | ||||
| logger = logging.getLogger("api") | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| class SignedCertificateDetailResource(object): | ||||
|     def on_get(self, req, resp, cn): | ||||
|   | ||||
| @@ -5,7 +5,7 @@ from certidude import authority, push | ||||
| from certidude.auth import login_required, authorize_admin | ||||
| from certidude.decorators import serialize, csrf_protection | ||||
|  | ||||
| logger = logging.getLogger("api") | ||||
| logger = logging.getLogger(__name__) | ||||
|  | ||||
| class TagResource(object): | ||||
|     @serialize | ||||
|   | ||||
		Reference in New Issue
	
	Block a user