# -*- coding: utf-8 -*-
"""
Basic options.
"""
from .base import BaseOptions
from pydarkstar import logutils
import logging
import sys
import os


class BasicOptions(BaseOptions):
    def __init__(self, *args, **kwargs):
        super(BasicOptions, self).__init__(*args, **kwargs)

        self.verbose = False  # error, info, and debug
        self.silent = False  # error only

        self.add_argument('--verbose', action='store_true', help='report debug, info, and error')
        self.add_argument('--silent', action='store_true', help='report error only')

    def __after__(self):
        super(BasicOptions, self).__after__()
        fname = os.path.basename(os.path.dirname(sys.argv[0]))
        logutils.basic_config(verbose=self.verbose, silent=self.silent, fname='{}.log'.format(fname))
        self.log_values(level=logging.INFO)


if __name__ == '__main__':
    pass

@@ -121,29 +121,8 @@
 ing%0A
-import sys%0Aimport os%0A
 %0A%0Acl
@@ -611,71 +611,8 @@
 _()%0A
-        fname = os.path.basename(os.path.dirname(sys.argv%5B0%5D))%0A
     
@@ -690,10 +690,18 @@
 me='
-%7B%7D
+pydarkstar
 .log

Change logfile name