Created
March 13, 2012 18:31
-
-
Save ikeikeikeike/2030528 to your computer and use it in GitHub Desktop.
Fluentd + Django > views.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
sent (fluent.conf) :: | |
#<source> | |
# type tcp | |
# port 24224 | |
#</source> | |
""" | |
import logging | |
import datetime | |
from django.http import HttpResponse | |
logger = logging.getLogger('app.debug') | |
def sent(request): | |
logger.info({ | |
"from": "fromA", | |
"to": "fromB", | |
"date" : datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") | |
}) | |
return HttpResponse("None") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment