       util_add_error('Invalid clientid level');
     end if;
   end get_level_number;
+
+
+  procedure include_call_stack
+  as
+  begin
+    g_proc_name := 'include_call_stack';
+
+    update logger_prefs
+    set pref_value = 'TRUE'
+    where pref_name = 'INCLUDE_CALL_STACK';
+
+    if not logger.include_call_stack then
+      util_add_error('Faling on true');
+    end if;
+
+    update logger_prefs
+    set pref_value = 'FALSE'
+    where pref_name = 'INCLUDE_CALL_STACK';
+
+    -- reset contexts so that it looks at new one (could have called Logger.configure but more than what I need here)
+    logger.null_global_contexts;
+
+    if logger.include_call_stack then
+      util_add_error('Faling on false');
+    end if;
+
+    -- Test with client
+    dbms_session.set_identifier(gc_client_id);
+    logger.set_level(
+      p_level => logger.g_debug,
+      p_client_id => gc_client_id,
+      p_include_call_stack => 'TRUE'
+    );
+
+    if not logger.include_call_stack then
+      util_add_error('Faling on true (client_id)');
+    end if;
+
+  end include_call_stack;
+
+
+  procedure date_text_format_base
+  as
+    l_start date;
+    l_stop date;
+  begin
+    g_proc_name := 'date_text_format_base';
+
+    -- Test Seconds
+    l_start := to_date('10-Jan-2015 20:40:10', 'DD-MON-YYYY HH24:MI:SS');
+    l_stop := to_date('10-Jan-2015 20:40:20', 'DD-MON-YYYY HH24:MI:SS');
+    if logger.date_text_format_base (
+        p_date_start => l_start,
+        p_date_stop => l_stop) != '10 seconds ago' then
+      util_add_error('Error with seconds');
+    end if;
+
+    -- Test Minutes
+    l_start := to_date('10-Jan-2015 20:30', 'DD-MON-YYYY HH24:MI');
+    l_stop := to_date('10-Jan-2015 20:40', 'DD-MON-YYYY HH24:MI');
+    if logger.date_text_format_base (
+        p_date_start => l_start,
+        p_date_stop => l_stop) != '10 minutes ago' then
+      util_add_error('Error with minutes');
+    end if;
+
+    -- Test Hours (and that it's 1 hour not 1 hours)
+    l_start := to_date('10-Jan-2015 20:30', 'DD-MON-YYYY HH24:MI');
+    l_stop := to_date('10-Jan-2015 21:40', 'DD-MON-YYYY HH24:MI');
+    if logger.date_text_format_base (
+        p_date_start => l_start,
+        p_date_stop => l_stop) != '1 hour ago' then
+      util_add_error('Error with hours');
+    end if;
+
+    -- Test Days
+    l_start := to_date('10-Jan-2015 20:30', 'DD-MON-YYYY HH24:MI');
+    l_stop := to_date('12-Jan-2015 20:40', 'DD-MON-YYYY HH24:MI');
+    if logger.date_text_format_base (
+        p_date_start => l_start,
+        p_date_stop => l_stop) != '2 days ago' then
+      util_add_error('Error with days');
+    end if;
+
+    -- Test Weeks
+    l_start := to_date('10-Jan-2015 20:30', 'DD-MON-YYYY HH24:MI');
+    l_stop := to_date('30-Jan-2015 20:40', 'DD-MON-YYYY HH24:MI');
+    if logger.date_text_format_base (
+        p_date_start => l_start,
+        p_date_stop => l_stop) != '2 weeks ago' then
+      util_add_error('Error with weeks');
+    end if;
+
+    -- Test Months
+    l_start := to_date('10-Jan-2015 20:30', 'DD-MON-YYYY HH24:MI');
+    l_stop := to_date('11-Mar-2015 20:40', 'DD-MON-YYYY HH24:MI');
+    if logger.date_text_format_base (
+        p_date_start => l_start,
+        p_date_stop => l_stop) != '2 months ago' then
+      util_add_error('Error with months');
+    end if;
+
+    -- Test Years
+    l_start := to_date('10-Jan-2015 20:30', 'DD-MON-YYYY HH24:MI');
+    l_stop := to_date('11-Mar-2016 20:40', 'DD-MON-YYYY HH24:MI');
+    if logger.date_text_format_base (
+        p_date_start => l_start,
+        p_date_stop => l_stop) != '1.2 years ago' then
+      util_add_error('Error with years');
+    end if;
+
+  end date_text_format_base;
+
+
+  -- Will not test date_text_format since it's dependant on current date and uses date_text_format_base
+
+  -- Will not test get_debug_info since it's too specific to where it's being called
+
+  procedure log_internal
+  as
+    l_params logger.tab_param;
+    l_scope logger_logs.scope%type;
+    l_row logger_logs_5_min%rowtype;
+
+  begin
+    g_proc_name := 'log_internal';
+
+    logger.append_param(l_params, 'p_test1', 'test1');
+
+    -- Set the level to error then log at debug.
+    -- Should still register since log_internal doesn't check ok_to_log (which is as expected)
+    logger.set_level(p_level => logger.g_error);
+
+    l_scope := lower('logger_test_' || dbms_random.string('x',20));
+    logger.log_internal(
+      p_text => 'test',
+      p_log_level => logger.g_debug,
+      p_scope => l_scope,
+      p_extra => 'extra',
+      p_callstack => null,
+      p_params => l_params);
+
+    select *
+    into l_row
+    from logger_logs_5_min
+    where 1=1
+      and scope = l_scope;
+
+    if l_row.text != 'test' then
+      util_add_error('text failed');
+    end if;
+
+    if l_row.logger_level != logger.g_debug then
+      util_add_error('Level failed');
+    end if;
+
+    if l_row.extra !=
+'extra
+
+*** Parameters ***
+
+p_test1: test1' then
+      util_add_error('Extra Failed');
+    end if;
+
+    -- Add test to make sure other columns aren't null?
+
+
+  end log_internal;
+
+
+
+  -- *** PUBLIC *** --
 
 
   procedure null_global_contexts


    -- Reset client_id
    dbms_session.set_identifier(null);
  end util_test_setup;



    end if;

    -- Test for client_id
    dbms_session.set_identifier(gc_client_id);
    logger.save_global_context(
      p_attribute => 'TEST',
      p_value => 'test_client_id',
      p_client_id => gc_client_id);

    if sys_context(logger.g_context_name, 'TEST') != 'test_client_id' then
      util_add_error('Context not setting (client_id);');
