def init(access_token, environment='<STR_LIT>', scrub_fields=None, url_fields=None, **kw):
global SETTINGS, agent_log, _initialized, _transforms, _serialize_transform, _threads<EOL>if scrub_fields is not None:<EOL><INDENT>SETTINGS['<STR_LIT>'] = list(scrub_fields)<EOL><DEDENT>if url_fields is not None:<EOL><INDENT>SETTINGS['<STR_LIT>'] = list(url_fields)<EOL><DEDENT>SETTINGS = dict_merge(SETTINGS, kw)<EOL>if _initialized:<EOL><INDENT>if not SETTINGS.get('<STR_LIT>'):<EOL><INDENT>log.warning('<STR_LIT>')<EOL><DEDENT>return<EOL><DEDENT>SETTINGS['<STR_LIT>'] = access_token<EOL>SETTINGS['<STR_LIT>'] = environment<EOL>if SETTINGS.get('<STR_LIT>'):<EOL><INDENT>logging.basicConfig()<EOL><DEDENT>if SETTINGS.get('<STR_LIT>') == '<STR_LIT>':<EOL><INDENT>agent_log = _create_agent_log()<EOL><DEDENT>_serialize_transform = SerializableTransform(safe_repr=SETTINGS['<STR_LIT>']['<STR_LIT>'],<EOL>whitelist_types=SETTINGS['<STR_LIT>']['<STR_LIT>'])<EOL>_transforms = [<EOL>ScrubRedactTransform(),<EOL>_serialize_transform,<EOL>ScrubTransform(suffixes=[(field,) for field in SETTINGS['<STR_LIT>']], redact_char='<STR_LIT:*>'),<EOL>ScrubUrlTransform(suffixes=[(field,) for field in SETTINGS['<STR_LIT>']], params_to_scrub=SETTINGS['<STR_LIT>'])<EOL>]<EOL>shortener_keys = [<EOL>('<STR_LIT>', '<STR_LIT:POST>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT:body>', '<STR_LIT>', '<STR_LIT:POST>'),<EOL>('<STR_LIT:body>', '<STR_LIT>', '<STR_LIT>'),<EOL>]<EOL>if SETTINGS['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>shortener_keys.append(('<STR_LIT:body>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:*>', '<STR_LIT:code>'))<EOL>shortener_keys.append(('<STR_LIT:body>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:*>', '<STR_LIT:args>', '<STR_LIT:*>'))<EOL>shortener_keys.append(('<STR_LIT:body>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:*>', '<STR_LIT>', '<STR_LIT:*>'))<EOL>shortener_keys.append(('<STR_LIT:body>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:*>', '<STR_LIT>', '<STR_LIT:*>'))<EOL><DEDENT>shortener_keys.extend(SETTINGS['<STR_LIT>'])<EOL>shortener = ShortenerTransform(safe_repr=SETTINGS['<STR_LIT>']['<STR_LIT>'],<EOL>keys=shortener_keys,<EOL>**SETTINGS['<STR_LIT>']['<STR_LIT>'])<EOL>_transforms.append(shortener)<EOL>_threads = queue.Queue()<EOL>events.reset()<EOL>filters.add_builtin_filters(SETTINGS)<EOL>_initialized = True<EOL>
Saves configuration variables in this module's SETTINGS.

access_token: project access token. Get this from the Rollbar UI:
              - click "Settings" in the top nav
              - click "Projects" in the left nav
              - copy-paste the appropriate token.
environment: environment name. Can be any string; suggestions: 'production', 'development',
             'staging', 'yourname'
**kw: provided keyword arguments will override keys in SETTINGS.